-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
plone-backend image is not responding correctly to SIGTERM #130
Comments
I'm not sure I can reproduce this one: $ docker run --name plone -it --rm -p 8080:8080 -e SITE=Plone plone/plone-backend docker top should give you the insights
Installing htop in container also shows Doing |
@avoinea Thanks for checking. I was uncertain if I should post it here on plone-backend or if it maybe was a docker compose specific issue. But I can also reproduce it with the 'pure' plone-backend image . If you run the container with:
so it is started in the background. And when you then stop the container with
[ 10 - 11 seconds]
You will see it takes 10-11 seconds before the container is really stopped. Maybe when running the docker container in the foreground with stdout connected/redirected to the terminal session, the ctrl-c is passed on different and the container stops immediately. But running it detached, in compose or probably in a stack the signal is not coming through correctly. |
I think the signal is getting passed to the application fine but waitress doesn't have any support for a graceful shutdown using SIGTERM. See Pylons/waitress#198 Ctrl+C works because it sends SIGINT, not SIGTERM. |
As a workaround we could probably put But both that solution and the status quo have the downside of interrupting in-flight requests. It would be nice to use a WSGI server that supports graceful shutdown. |
Graceful shutdown is a must, seconding that request. |
While testing the cookiecutter-plone-starter docker compose setup today I noticed that when I stop the compose setup, the backend container takes 10-11 seconds to stop. This is the 10 second timeout when the application in side the container doesn't respond correclty to the 'nice' way of asking to stop (I think SIGTERM) and then a SIGKILL follows.
This might have to do something with our entrypoint script that starts the instancne and somewhere along the process chain the signals are not correctly passed along. Any takers? ;-)
The text was updated successfully, but these errors were encountered: