I'm using jenkins slave in AWS ECS cluster, I config like this web: Jenkins in ECS.
Normally it works well, but sometimes in rush hour, the slave container starts very slow, more than 40mins, or even can not start container.
I have to terminated the ECS instance, then launch a new one. When the container cannot start I saw a logs in ecs-agent:
STOPPED, Reason CannotCreateContainerError: API error (500): devmapper: Thin Pool has 788 free data blocks which is less than minimum required 4454 free data blocks. Create more free space in thin pool or use dm.min_free_space option to change behavior
Here is my docker info, please advise me how to fix this issue.
[root@ip-10-124-2-159 ec2-user]# docker info
Containers: 10
Running: 1
Paused: 0
Stopped: 9
Images: 2
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-docker--pool
Pool Blocksize: 524.3 kB
Base Device Size: 10.74 GB
Backing Filesystem: ext4
Data file:
Metadata file:
Data Space Used: 8.646 GB
Data Space Total: 23.35 GB
Data Space Available: 14.71 GB
Metadata Space Used: 2.351 MB
Metadata Space Total: 25.17 MB
Metadata Space Available: 22.81 MB
Thin Pool Minimum Free Space: 2.335 GB
Udev Sync Supported: true
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.93-RHEL7 (2015-01-28)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 4.4.39-34.54.amzn1.x86_64
Operating System: Amazon Linux AMI 2016.09
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.8 GiB
Name: ip-10-124-2-159
ID: 6HVT:TWH3:YP6T:GMZO:23TM:EUAA:F7XJ:ISII:QDE7:V2SN:XKFI:XPGZ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
And I don't know why only 4 tasks can be run at the same time, even resource of ECS instance still available, how can I increase it