lua-nginx-module
lua-nginx-module copied to clipboard
Embed the Power of Lua into NGINX HTTP servers
when using a shared dict where all nginx workers repeatedly :get() the same 1-2 keys with a high number of simultaenous requests, some nginx processes seem to get stuck in...
### 问题版本号 ngx_lua-0.10.13 最新的代码,应该也存在问题 ### 问题复现用例 ``` local fetch = function(uri) return ngx.location.capture(uri) end local t1 = ngx.thread.spawn(fetch, "/f1")-- 子请求f1(0.1s 返回结果) local t2 = ngx.thread.spawn(fetch, "/f2")-- 子请求f2(0.2s 返回结果) ngx.thread.wait(t1, t2)...
Greetings! I've been investigating **lua-nginx-module** with **Svace** static analyzer and it found a curious method to look at. https://github.com/openresty/lua-nginx-module/blob/004922e1cf95eabde001203e2010365ff5d3e70d/src/ngx_http_lua_socket_tcp.c#L1629-L1881 Here the return value of method incovation `SSL_set_tlsext_status_type()` (which calls `SSL_ctrl()`...
I'm wondering if there is a way to use libuv in the background. I've tried the following in init_worker_by_file, and it appears that while the timers fire and the thread...
The server is broken # Question In a request, `ngx.status` can only be captured as `307` in the `header_filter_by_lua_file` stage, and this request cannot be obtained in `body_filter_by_lua`. # Environment:...
In `ngx_http_lua_headers_out.c` the 'WWW-Authenticate' header handler is set to `ngx_http_set_builtin_header`: ``` { ngx_string("WWW-Authenticate"), offsetof(ngx_http_headers_out_t, www_authenticate), ngx_http_set_builtin_header }, ``` But from the RFC https://datatracker.ietf.org/doc/html/rfc7235#section-4.1: > User agents are advised to take...
When I create a coroutine using coroutine.wrap and then resume it, coroutine.resume skips the first "status" value and returns all other values. As docs says it must return the first...
test.lua: ```lua coroutine.wrap(function() print("hello") end)() ``` Requiring with luajit: ``` $ luajit -e "require'test'" hello ``` Requiring in content_by_lua_block: ``` http { server { listen 8080; lua_code_cache off; location /...
我们在回归测试时遇到这样一个问题: nginx reload时,nginx master进程会收到子进程退出信号,并调用 ngx_process_get_status强制释放共享内存锁。 #0 0x000055e2ccdd6a9a in ngx_shmtx_force_unlock (mtx=0x68, pid=3086274) at src/core/ngx_shmtx.c:155 #1 0x000055e2cce03804 in ngx_unlock_mutexes (pid=3086274) at src/os/unix/ngx_process.c:647 #2 0x000055e2cce0371a in ngx_process_get_status () at src/os/unix/ngx_process.c:596 #3 0x000055e2cce03378 in...
After a `ngx.semaphore.wait()` call, if the current request is terminated by Nginx due to `client_header_timeout` or `client_body_timeout`, the corresponding `post()` is never executed. As a result, all subsequent attempts to...