Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init_by_lua during Nginx config test #2311

Open
Rockybilly opened this issue May 16, 2024 · 3 comments
Open

init_by_lua during Nginx config test #2311

Rockybilly opened this issue May 16, 2024 · 3 comments

Comments

@Rockybilly
Copy link

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.

  1. Making running init_by_lua during "nginx -t" conditional by a directive
  2. Adding a new phase like config_test_by_lua therefore seperating it from init_by_lua, so resolving the reason why this feature was removed in the first place.
@spacewander
Copy link
Member

#1377 (comment)
Maybe you can use this way.

@spacewander
Copy link
Member

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.

@Rockybilly
Copy link
Author

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants