Gracefully Shutting down a docker


niietzshe

Recommended Posts

I have a problem where stopping a docker from the UnRaid UI forces a kill after 10 seconds on all processes, meaning the service doesn't finish doing what it should be doing:

 

*** Shutting down runit daemon (PID 12)...
*** Killing all processes...
2015-10-17 14:22:26.321 [iNFO ] [penhab.io.rest.RESTApplication] - Stopped REST API
*** Not all processes have exited in time. Forcing them to exit.

 

Any idea of the best way to approach this problem so the docker doesn't just kill all the processes, but waits for them to finish?

Thanks

C

Link to comment
  • 4 weeks later...

I'm seeing it when I exec bash into the docker, then shut it down from the unraid UI.

It's my own docker:

https://github.com/christianwaite/dockerapp-openhab

 

Hasn't been causing problems, but I want to use a db4o database and that will corrupt it if it's not given enough time to shut down. There's a post about it here:

https://labs.ctl.io/gracefully-stopping-docker-containers/

 

But I don't know how unraid handles shutting down dockers.

Thanks

Christian

Link to comment

Erm.. I think the whole reason I knew about this was that it was quitting before the application I'm running had a chance to remove the lock file, which was happening without me exec'd into bash. I'll test this tonight, but I'm pretty confident it's still doing it if I'm not in the session.

 

Thanks for the help

Christian

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.