-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed the bug: when nginx is reloaded, work_process cann't exit for l…
…ong time
- Loading branch information
1 parent
d050059
commit 75b4a12
Showing
1 changed file
with
33 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75b4a12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit seems to cause segfault sometimes, as discussed in #258 , some other times it doesn't cause segfault but the worker process will stay in shutting down mode for long time (~30min), the symptom that this commit is supposed to fix :)
75b4a12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit is only changed to clear the timer which is used to delete the outdated upstream server. And then the function 'ngx_http_upsync_clear_all_events' only be executed when the nginx restarted/stoped and only be executed one time.
As you said @gfrankliu , It sometimes cored and sometimes it's not worked which will be still shutting down long time. Both are not normal.
As code shows above, 'ngx_http_upsync_clear_all_events' will be executed when the process exited. So it's not be still shutting down mode for long time theoretically.
I hope you can add some logs to see if the code of the commit is executed normally.
Thanks @gfrankliu
75b4a12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details are posted in #258
Also, this is easily reproducible. You can issue reload a few times and see either one of the two behaviors (crash or hang). Are you not seeing it in your test?