Taking a long time for Docker container to stop
See original GitHub issue$ time docker stop py-kms
py-kms
________________________________________________________
Executed in 10.21 secs fish external
usr time 15.06 millis 0.00 micros 15.06 millis
sys time 6.14 millis 282.00 micros 5.86 millis
Maybe the stop signal is incorrect or needs to be setup properly in the application code?
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
It takes too long to shut down the Docker container
The default number of seconds the docker container stop <container_name> command will wait before the killing is 10 seconds. Share.
Read more >The Reason Why You Need to Wait When Stopping Your ...
Docker has limited patience when it comes to stopping containers. There's a timeout, which is 10 seconds by default for each container. If...
Read more >Docker takes a really long time to start / stop containerized ...
The time spent seems to be very CPU bound, and we're talking about upwards of 6+ seconds to start and stop a container...
Read more >Fix slow container shutdown - donchev.is
Add STOPSIGNAL SIGINT to your Dockerfile (this is a quick & dirty solution and only takes care of one edge case and shouldn't...
Read more >Why Does My Docker Container Stop? - Tutorial Works
When you run a container image you've pulled from a registry like Docker Hub, you're launching a process. This process will, eventually, complete....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It never actually succeeds in stopping the container at all. It’s waiting 10 seconds for a graceful stop (which never happens) and then it’s sending the container the kill signal:
As also noted in the Docker documentation the default waiting period is 10 seconds (which is what I’m observing as the time it takes to stop the container):
Seems fixed now: