fix(docker): exec gunicorn in run-server.sh so it receives SIGTERM#41173
fix(docker): exec gunicorn in run-server.sh so it receives SIGTERM#41173mjlshen wants to merge 1 commit into
Conversation
Code Review Agent Run #aef9e5Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
e0a731a to
d4b8160
Compare
Code Review Agent Run #99d29eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
d4b8160 to
4edc157
Compare
|
The |
4edc157 to
68239d5
Compare
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Thanks for the review @rusackas ! Incremented the Chart version and regenerated the README :D |
Code Review Agent Run #b151fdActionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
run-server.sh launches gunicorn without exec, so when the script is the container's entrypoint the shell stays PID 1 and gunicorn runs as its child. A container's PID 1 is only sent a signal if it has installed a handler for it; the shell installs none for SIGTERM, so the SIGTERM delivered on `docker stop` / Kubernetes pod termination never reaches gunicorn and gets SIGKILLed when the grace preiod expires, dropping in-flight requests on every restart and preventing graceful rollouts. Signed-off-by: Michael Shen <mishen@umich.edu>
68239d5 to
e5bc86b
Compare
SUMMARY
run-server.sh launches gunicorn without exec, so when the script is the container's entrypoint the shell stays PID 1 and gunicorn runs as its child. A container's PID 1 is only sent a signal if it has installed a handler for it; the shell installs none for SIGTERM, so the SIGTERM delivered on
docker stop/ Kubernetes pod termination never reaches gunicorn and gets SIGKILLed when the grace period expires, dropping in-flight requests on every restart and preventing graceful rollouts.TESTING INSTRUCTIONS
You can make this change by overriding the default command in a Kubernetes cluster, or this minimally reproducible example that just demonstrates the issue with plain
gunicornwherenoexec.shandexec.shexist in the container with onlyexecas the difference:Results:
ADDITIONAL INFORMATION