Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-compose restart connection pool full

My team and I are converting some of our infrastructure to docker using docker-compose. Everything appears to be working great the only issue I have is doing a restart it gives me a connection pool is full error. I am trying to figure out what is causing this. If I remove 2 containers or (1 complete setup) it works fine.

A little background on what I am trying to do. This is a Ruby on Rails application that is being ran with multiple different configurations for different teams within an organization. In total the server is running 14 different containers. The host server OS is CentOS, and the compose command is being ran from a MacBook Pro on the same network. I have also tried this with a boot2docker VM with the same result.

Here is the verbose output from the command (using the boot2docker vm) https://gist.github.com/rebelweb/5e6dfe34ec3e8dbb8f02c0755991ef11

Any help or pointers is appreciated.

like image 877
Ryan Condron Avatar asked Apr 03 '18 20:04

Ryan Condron


People also ask

Does Docker compose restart failed containers?

no: Containers will not restart automatically. on-failure[:max-retries]: Restart the container if it exits with a non-zero exit code and provide a maximum number of attempts for the Docker daemon to restart the container. always: Always restart the container if it stops.


1 Answers

I got the same issue with my Django Application. Running about 70 containers in docker-compose. This post helped me since it seems that prune is needed after setting COMPOSE_PARALLEL_LIMIT

I did:

docker-compose down
export COMPOSE_PARALLEL_LIMIT=1000
docker network prune
docker-compose up -d
like image 83
Jimmy Engelbrecht Avatar answered Oct 03 '22 02:10

Jimmy Engelbrecht