Docker daemon hangs on 'create'

Hi,

I’m trying to validate how many concurrent ‘run’ commands I can issue to the docker daemon to create and start multiple containers simultaneously.
All in all it’s working well, but once in a while the daemon seems to be stuck for 10-30 seconds on creating the container.

The docker log file simply shows this when stuck:

[info] POST /v1.15/containers/create
[c9cadee1] +job create()

I’m running a simple bash loop to launch an nginx container:

for (( i=1; i <= 100; i++ ))
do
docker run -d -P nginx
done

Every ~40 iterations or so it seems that the daemon is stuck. It eventually releases and continues to launch containers successfully.

Does anyone have an idea as to why it stalls, or how I can debug it?

Thanks,

Ofer

can you please give us more information wrt your docker and hardware?

ie, run docker -D info and docker version

We’re running on an EC2 c3.xlarge (Amazon Linux AMI).

[ec2-user@ip- ~]$ sudo docker -D info
Containers: 0
Images: 13
Storage Driver: devicemapper
 Pool Name: docker-202:1-263447-pool
 Pool Blocksize: 65.54 kB
 Data file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
 Data Space Used: 433.5 MB
 Data Space Total: 107.4 GB
 Metadata Space Used: 1.122 MB
 Metadata Space Total: 2.147 GB
 Library Version: 1.02.89-RHEL6 (2014-09-01)
Execution Driver: native-0.2
Kernel Version: 3.14.20-20.44.amzn1.x86_64
Operating System: Amazon Linux AMI 2014.09
Debug mode (server): false
Debug mode (client): true
Fds: 12
Goroutines: 12
EventsListeners: 0
Init SHA1: e8397e6fa91ab47d604f8441fe6967660ff05b4f
Init Path: /usr/libexec/docker/dockerinit

[ec2-user@ ~]$ sudo docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): c78088f/1.3.2
OS/Arch (client): linux/amd64
Server version: 1.3.2
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): c78088f/1.3.2

Thanks,
Ofer

I’ve just run this on my local box with Docker v1.4.1, and its not happening here - it might be interesting to see if Docker v1.4.1 changes it for you too.

Thanks Sven!

Upgrading to 1.4.1 seems to have resolved the issue.

Ofer