openresty / openresty/lua-nginx-module
NGINX set variable not working
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
I have already set the variable start_time in my nginx config but somehow that variable is not getting picked up in access_log. We have so many variables set the same way and everything else works.
set $start_time ' ';
2022/06/10 14:45:18 [error] 43558#43558: *13295093 lua entry thread aborted: runtime error: /apps_01/apigw/etc/nginx/lua/something.lua:40: variable "start_time" not found for writing; maybe it is a built-in variable that is not changeable or you forgot to use "set $start_time '';" in the config file to define it first
stack traceback:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the NGINX configuration containing set $start_time and the Lua code at /apps_01/apigw/etc/nginx/lua/something.lua:40, then reproduce the variable access with a minimal configuration. Done means the variable is available to the Lua code and is recorded by access_log without the reported runtime error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100