Docker Community Forums

Share and learn in the Docker community.

Docker (php containers) stop responding every once in a while

#1

We are running a docker stack for a web server and occasionally (couple times per week) we will get no response from the backend (php, mariadb). The mariadb database is still accessable through other db GUIs and the nginx still serves up the html of the site but no data comes back.

We use cadvisor to watch the processing on the stack and when this happens, we can see that core 0 is hanging at 50% processing power. When we see this go back down or if it is down, everything works. In another graph it indicates that this is a kernel task, not a user task.

We have 20 cores and 48G RAM assigned to docker so I don’t know why 1 core at 50% is blocking everything.

I have a netshoot container running on the same network and connect successfully to each service (php, mariadb, nginx) running: nc -vnz -w 1 10.0.0.5 3306 etc. on each service and get: Connection to 10.0.0.5 3306 port [tcp/*] succeeded!

Hopefully someone else has run into this and can help. I can’t see anything in the logs or activity monitor that shows this core hung at 50%

Docker Desktop Community
V 2.0.0.3
channel: stable
Engine: 18.09.2
Compose 1.23.2
Machiine: 0.16.1
Notary: 0.6.1

Mac Pro (late 2013)
Mojave 10.14.4
Processor: 2.7 GHz 12 core Xeon E6
Memory: 64 GB

docker-compose.yml

version: ‘3.6’

services:
nginx:
image: eternaldb/nginx
ports:
- “80:80”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
configs:
- source: nginx_config
target: /etc/nginx/nginx.conf
mode: 0444
environment:
TZ: America/Chicago
volumes:
- type: bind
source: /private/var/www/docker_files/nginx/sites-enabled
target: /etc/nginx/sites-enabled/
- /private/var/www:/usr/share/nginx/html:delegated

php:
image: eternaldb/phplaravel:7.2b
ports:
- “9000:9000”
deploy:
replicas: 5
restart_policy:
condition: any
max_attempts: 10
logging:
driver: “json-file”
options:
max-size: “5m”
max-file: “3”
configs:
- source: php_config
target: /usr/local/etc/php-fpm.d/www.conf
mode: 0444
- source: phpini_config
target: /usr/local/etc/php/php.ini
mode: 0444
environment:
TZ: America/Chicago
volumes:
- /private/var/www:/usr/share/nginx/html:delegated

rstudio:
image: eternaldb/rstudio:allplugins4
ports:
- “0.0.0.0:8787:8787”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD: *****************
ROOT: “TRUE”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

plumber:
image: eternaldb/plumber:allplugins5
command: /home/rstudio/kitematic/r-scripts/projects_empire/docker_test/plumber.R
ports:
- “0.0.0.0:8000:8000”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD:*****************
ROOT: “TRUE”
JAVA_HOME: “/usr/lib/jvm/java-8-openjdk-amd64”
LD_LIBRARY_PATH: “/usr/local/lib/R/site-library”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

plumber1:
image: eternaldb/plumber:allplugins5
command: /home/rstudio/kitematic/r-scripts/projects_empire/docker_test/plumber.R
ports:
- “0.0.0.0:8001:8000”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD:*******************
ROOT: “TRUE”
JAVA_HOME: “/usr/lib/jvm/java-8-openjdk-amd64”
LD_LIBRARY_PATH: “/usr/local/lib/R/site-library:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-8-openjdk-amd64/lib/server”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

plumber2:
image: eternaldb/plumber:allplugins5
command: /home/rstudio/kitematic/r-scripts/projects_empire/docker_test/plumber.R
ports:
- “0.0.0.0:8002:8000”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD:********************
ROOT: “TRUE”
JAVA_HOME: “/usr/lib/jvm/java-8-openjdk-amd64”
LD_LIBRARY_PATH: “/usr/local/lib/R/site-library:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-8-openjdk-amd64/lib/server”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

plumber3:
image: eternaldb/plumber:allplugins5
command: /home/rstudio/kitematic/r-scripts/projects_empire/docker_test/plumber.R
ports:
- “0.0.0.0:8003:8000”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD:***********************
ROOT: “TRUE”
JAVA_HOME: “/usr/lib/jvm/java-8-openjdk-amd64”
LD_LIBRARY_PATH: “/usr/local/lib/R/site-library:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-8-openjdk-amd64/lib/server”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

plumber4:
image: eternaldb/plumber:allplugins5
command: /home/rstudio/kitematic/r-scripts/projects_empire/docker_test/plumber.R
ports:
- “0.0.0.0:8004:8000”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD:************************
ROOT: “TRUE”
JAVA_HOME: “/usr/lib/jvm/java-8-openjdk-amd64”
LD_LIBRARY_PATH: “/usr/local/lib/R/site-library:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-8-openjdk-amd64/lib/server”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

plumber5:
image: eternaldb/plumber:allplugins5
command: /home/rstudio/kitematic/r-scripts/projects_empire/docker_test/plumber.R
ports:
- “0.0.0.0:8005:8000”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
PASSWORD:***********************
ROOT: “TRUE”
JAVA_HOME: “/usr/lib/jvm/java-8-openjdk-amd64”
LD_LIBRARY_PATH: “/usr/local/lib/R/site-library:/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-8-openjdk-amd64/lib/server”
TZ: America/Chicago
volumes:
- /private/var/www:/home/rstudio/kitematic:delegated
- type: bind
source: /private/mnt
target: /mnt
- type: bind
source: /Volumes
target: /mnt2

mariadb:
image: eternaldb/mariadb
ports:
- “3306:3306”
deploy:
replicas: 1
restart_policy:
condition: any
max_attempts: 10
environment:
MYSQL_ROOT_PASSWORD:************************
TZ: America/Chicago
volumes:
- maria_db:/var/lib/mysql:rw
- type: bind
source: /private/var/www/docker_files/mariadb
target: /etc/mysql/conf.d

configs:
nginx_config:
file: nginx/nginx.conf
php_config:
file: php/www.conf
phpini_config:
file: php/php.ini

volumes:
maria_db:
external: true