-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
workers should ignore HUP signal Only master should kill them #1868
base: master
Are you sure you want to change the base?
Conversation
what issue are you trying to solve? |
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.
I disagree with this change. USR signal is actually resetted to default in the worker (set to SIG_DFL), which the whole point of having it there. Why do you want to ignore it anyway?
gunicorn/arbiter.py
Outdated
@@ -415,6 +415,9 @@ def reload(self): | |||
for i in range(self.cfg.workers): | |||
self.spawn_worker() | |||
|
|||
#Sleeping so that new workers get time to boot | |||
time.sleep(2) |
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 arbiter should be able to manage immediately the new worker. There is no need to sleep thre normally, why adding it?
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.
Wanted to give some time to the newly spawned workers to initialise themselves.
By I guess you are correct it should not stop the arbiter to manage the worker count. Will remove this.
@ashishmjn bump, which issue are you trying to solve with this patch? |
@benoitc Sorry for the late reply. |
I don't think I'm opposed to this, but you can work around it by not using |
I would be more inclined to accept a @benoitc how do you feel about that change? If that's acceptable, I propose we document it in |
@tilgovi Agreed |
i guess it should work, provided we don't break any other applications that may using it. If we do the patch we should indeed document it and mark it as a breaking change imo. |
We initialize signals before |
Agree that we'll need to just document it carefully. |
No description provided.