SIGINT handler is annoying during socket bind #3470
pajod
started this conversation in
Issue Triage
Replies: 2 comments 2 replies
-
|
why not adding a handler on SIGINT that set a variable. On each retry you check if stop (the variable) is set and then stop ? in arbiter: in socks: Or something like it? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@pajod does it answer to your question? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Type
Bug Report
Description
Because of the 5-second delay in retrying socket bind (which I do not intend to meaningfully change in #3454) hitting Ctrl+C during startup is ignored. I do believe retrying for most OSError is useful, so things do not break simply from (common) incorrect service startup ordering during system/container boot.
Simply moving the signal handler installation up in the arbiter startup code may not be a perfect solution either, because Gunicorn should not ignore other signals during startup.
Looking for ideas to keep startup interruptible without reorganizing current signal installation too much.
Steps to Reproduce (for bugs)
Ask to bind to an address not associated with any accessible interface, e.g.:
python3 -m gunicorn --log-level=info --bind="[fe80::]:8000" myapp:appLogs / Error Output
Gunicorn Version
gunicorn 24.1.0
Python Version
Python 3.11.2
Worker Class
N/A (feature request)
Operating System
Debian
Additional Context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions