Shutting down MongoDB inside Docker container causes 100% CPU

I’ve been pulling my hair over this one for days now, to the point I am dropping this here. Using docker-compose I start a few containers, one of which is running mongodb, using CMD [“/usr/bin/mongod”] However, when I shut down the container using docker stop, the mongod process takes 100% cpu and keeps running forever without being able to kill it. When killing the parent processes, the mongod process becomes a child of init, but in its same state. Mongodb does log that it shutted down with error code 0 though.

Docker version: 17.04.0-ce
Docker-compose version: 1.11.2

  • How to capture packets for single docker container
  • Should I scale down Openshift app's replicas before deleting its resources?
  • docker-compose django-postgres error
  • Docker: Download all from nltk in Dockerfile
  • supervoord gave up nodejs entered FATAL state
  • Is there a straight way to get html response from a unix socket in Go (like curl does)?
  • What I tried so far:

    • different linux distro’s
    • supervisord within container to handle mongod
    • added –init to docker daemon
    • run mongod as a fork
    • look for kernel update, but 3.14 seems to be the latest (running on Odroid C2)
    • different storage drivers, but only aufs works (overlay needs higher kernel)

    All without any joy..

    enter image description here

  • Storing in an ENV the outcome of a git command
  • What is POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1?
  • Expose Port for App via wercker.yml
  • Connection fail for Apache LDAP Authentication
  • How to run an electron app on docker
  • How to get data from docker container into shared folder at host?
  • One Solution collect form web for “Shutting down MongoDB inside Docker container causes 100% CPU”

    After updating the kernel to 4.x on the Odroid-C2 using this link, the problem went away.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.