Docker daemon hangs

Viewed 2085

I am new to docker and trying to see why my docker daemon hangs.

I have increased my base pool size to 15GB to start up oracle db container. I was successfully able to start it but after some time my Virtual Machine stops responding and soon after docker stopped. I couldn't get it started for whatever reason.

This is the command that I have run, /usr/bin/dockerd --storage-opt dm.basesize=15G &

I see the logs as below:

WARN[0000] containerd: low RLIMIT_NOFILE changing to max  current=1024 
max=4096
WARN[0001] devmapper: Usage of loopback devices is strongly discouraged for 
production use. Please use `--storage-opt dm.thinpooldev` or use `man 
docker` to refer to dm.thinpooldev section.
WARN[0001] devmapper: Base device already exists and has filesystem xfs on 
it. User specified filesystem  will be ignored.
INFO[0001] [graphdriver] using prior storage driver "devicemapper"
INFO[0001] Graph migration to content-addressability took 0.00 seconds
WARN[0001] mountpoint for pids not found
INFO[0001] Loading containers: start.
INFO[0001] Firewalld running: false
INFO[0001] Default bridge (docker0) is assigned with an IP address 
172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address

After this, my virtual machine stops responding. I have to restart my virtual machine which in turn does not start docker. As soon as I start my docker daemon again, I see above logs

I am having rhel 7.3 and docker version 1.12, I am using docker-compose to create containers

Please let me know if you need more info

Thanks

2 Answers

The warning about loopback devices is there for a reason:

WARN[0001] devmapper: Usage of loopback devices is strongly discouraged for 
production use. Please use `--storage-opt dm.thinpooldev` or use `man 
docker` to refer to dm.thinpooldev section.

Most of the time it's Docker running out of space that causes the daemon to hang. On a loopback file system it can happen a bit more randomly, especially if your stressing the file system.

Try with a direct-lvm pool instead of a loopback device.

Once I've see docker service hangs on Ubuntu like this:

\_ /bin/sh /usr/sbin/invoke-rc.d docker start
   \_ systemctl --job-mode=ignore-dependencies start docker.service
      \_ /bin/systemd-tty-ask-password-agent --watch

The solution for me was disable systemd-ask-password-wall.service:

systemctl disable systemd-ask-password-wall.service
Related