Skip to content
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

Add graceful shutdown #1255

Open
sylvain-reynaud opened this issue Jan 13, 2023 · 3 comments
Open

Add graceful shutdown #1255

sylvain-reynaud opened this issue Jan 13, 2023 · 3 comments

Comments

@sylvain-reynaud
Copy link
Contributor

The container doesn’t shutdown gracefully. To stop it, I have to run docker rm -f <container_name>.

The container should shutdown gracefully for the reasons explained in the 12factor app: https://12factor.net/disposability

I would like to work on it, is it possible ?

@amaury1093
Copy link
Member

Sure. @sylvain-reynaud Could you clarify what exactly is your proposed solution?

@sylvain-reynaud
Copy link
Contributor Author

Ideally:

  • start a new thread to handle the SIGINT/SIGTERM signals
  • close HTTP request handles,
  • finish current HTTP requests then close DB connections

@amaury1093
Copy link
Member

That works for me. If you want to create a PR, I'll review (and approve) it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants