Open Rockybilly opened 3 months ago
https://github.com/openresty/lua-nginx-module/pull/1377#issuecomment-420604831 Maybe you can use this way.
The init_by_lua is disabled during nginx -t
and nginx -s
because complex OpenResty APP will have much logic in the init_by_lua.
#1377 (comment) Maybe you can use this way.
Thank you, it is certainly a valid workaround, however harder for me to implement in my current setup (hundreds of servers). With the current openresty toolset, it's easier for me to track reload failures and manually check error.log. If possible in the future config_test_by_lua_block
kind of extra phase would be very meaningful for the usage cases of openresty.
So the issue is well explained here init_by_lua is no longer run in Nginx config test??
I need this feature as well and I consider it to be very important for guaranteeing stability during Nginx reloads.
Here are some suggestions to be considered.