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

Container takes time to stop #32

Open
popallo opened this issue Jan 10, 2024 · 2 comments
Open

Container takes time to stop #32

popallo opened this issue Jan 10, 2024 · 2 comments
Assignees

Comments

@popallo
Copy link

popallo commented Jan 10, 2024

Hello everyone and thank you for sharing this excellent Dockerfile which is very useful to me.

I'm not an expert in Dockerfile (and Docker) but I was wondering about container downtime.

Indeed, on my side, the container using the built image takes more than 30 seconds to stop. So I think that a process is not stopping correctly and Docker is waiting for a timeout to take control and kill everything.

Anyone have an idea how to fix this? Or does it only affect my setup peharps? :)

I'm using the raw Dockerfile from this repo, I just modified a few things in the configuration files but nothing that could justify this long downtime.

I use docker-compose to launch the containers.

Thanks for the feedback.

@tomdess
Copy link
Owner

tomdess commented Jan 14, 2024

hello, it's strange, on my side haproxy takes 10 seconds to stop. Can you try using the image already built (ghcr.io/tomdess/docker-haproxy-certbot:master) and see if the behaviour changes?

@tomdess tomdess self-assigned this Jan 14, 2024
@popallo
Copy link
Author

popallo commented Jan 15, 2024

Hello, thank you for your feedback.

Even 10s is not "normal", as 10s is supposed to be the time Docker launches a SIGKILL on the container.

I have several servers, with different Docker containers and usually each container takes around 2s to shut down.

I tried to modify the Dockerfile in several ways, notably by not putting supervisord and therefore haproxy directly as the main process (PID 1 in the container) but that doesn't change anything.

I will do a more in-depth test as soon as I have a moment, with an "empty" haproxy configuration file, because currently I have quite a few backends running on it (around 50).

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

No branches or pull requests

2 participants