3 ms·
> Why is a process running within a container failing over more frequently than a process running directly on bare metal Because the way to change anything in
by user5994461 10y ago
> Why is a process running within a container failing over more frequently than a process running directly on bare metal
Because the way to change anything in a container is to kill it and restart it. That's a fundamental difference compared to managing/maintaining a database not in a container.
- subway 10y agoUnless you've written very poorly behaving software, you kill it by sending it a SIGTERM, and waiting for it to exit. This is true of software both within and outside of containers. The fact `docker kill` defaults to using SIGKILL instead of SIGTERM is unfortunate, and something one should be aware of before deploying a process with docker, but again, this does not make the process running within the container inherently less reliable. edit: Looks like `docker stop` does the right-ish thing -- sends a SIGTERM, then only resorts to SIGKILL after a timeout has expired.
- brazzledazzle 10y agoAlso worth noting that the timeout is a configurable parameter with `docker stop`.
- ec109685 10y agoYou don't have operate your container like that. If you need to push configuration to it, you can make it writeable.