Open travisbell opened 2 years ago
If you are using openresty-1.21.4, then there is a bug. This bug has been fix in the latest master branch.
Thanks @zhuizhuhaomeng, guess I'll either wait for a new release to be cut or try custom compiling the latest lua-nginx-module
.
Hi guys,
I'm not clear if this is just a documentation issue, or an actual bug. The docs for
ngx.run_worker_thread
state that it can work inside ofrewrite_by_lua*
,access_by_lua*
andcontent_by_lua*
. Based on my testing just now, it seems as though it actually only works withincontent_by_lua*
.When you try and use it inside of the other two phases, the function fires but then the request hangs indefinitely and never completes. No error or anything is reported, it just hangs forever.
nginx.conf
utils.lua
However, run the same block within a
content_by_lua_block
, and everything executes as expected.So what is it? A documentation issue, or should
ngx.run_worker_thread
work within these extra phases? This is on OR 1.21.4.1 by the way.