Opened 2 years ago
Last modified 2 years ago
#2401 new enhancement
Deployment on Heroku: add options to handle SIGTERM
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | documentation | Version: | 1.19.x |
Keywords: | Cc: | ||
uname -a: | Linux petr-ws 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.22.0
built by gcc 10.2.1 20210110 (Debian 10.2.1-6) configure arguments: --without-http_rewrite_module |
Description
I am using Nginx on Heroku in Docker container along with Gunicorn/Supervisor.
When Heroku scales down it first sends SIGTERM to all processes in the container and after 30 seconds it sends SIGKILL. I don't think, that I can change this behavior.
After receiving SIGTERM Nginx terminates ungracefully not waiting for running requests.
I wonder if the possibility to terminate gracefully on SIGTERM signal could be added.
Note:
See TracTickets
for help on using tickets.
I found temporary workaround by compiling Nginx from sources and patching them: