Git Product home page Git Product logo

Comments (2)

Grokzen avatar Grokzen commented on July 28, 2024 1

So by default docker is under this rule

Docker has limited patience when it comes to stopping containers.
There’s a timeout, which is 10 seconds by default for each container.
If even one of your containers does not respond to SIGTERM signals, Docker will wait for 10 seconds at least.

There is a flag at least for docker where timeouts can be lowered, if you need a shorter time to stop them you should look into that one and if docker-compose supports that flag in the config.

But the core issue is bash and that this container runs a bash script that runs all redis servers.

Normally, bash will ignore any signals while a child process is executing.
Starting the server with & will background it into the shell's job control system,
with $! holding the server's PID (to be used with wait and kill).
Calling wait will then wait for the job with the specified PID (the server) to finish, or for any signals to be fired.

I guess adding in a SIGTERM trap should not be that difficult to exit out the container more correct

from docker-redis-cluster.

johan-seesaw avatar johan-seesaw commented on July 28, 2024

I just corrected this in my own usage using dumb-init and execing the tail. Seemed to work well.

from docker-redis-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.