Closed Monviech closed 2 years ago
Temporary Fix:
Commenting out line
38 healthcheck:
39 test: mysqladmin -p${OTOBO_DB_ROOT_PASSWORD:?err} ping -h localhost
in
otobo-base.yml
solves the problem with zombie processes. The healthcheck of the mariadb 10.5 container doesn't work properly somehow.
Good catch. I started up the OTOBO containers on my Ubuntu devel machine and looked for those zombie processes with ps aux | grep Z
. But I did not see any. Then I tried running the health check command within the running db container.
mysql@9f936ffd28b9:/$ mysqladmin -h localhost ping
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'mysql'@'localhost' (using password: NO)'
mysql@9f936ffd28b9:/$ echo $?
0
mysql@9f936ffd28b9:/$ mysqladmin -h web ping
mysqladmin: connect to server at 'web' failed
error: 'Can't connect to MySQL server on 'web' (115)'
Check that mysqld is running and that the socket: '/run/mysqld/mysqld.sock' exists!
mysql@9f936ffd28b9:/$ echo $?
1
mysql@9f936ffd28b9:/$ mysqladmin -h db ping
mysqladmin: connect to server at 'db' failed
error: 'Access denied for user 'mysql'@'172.18.0.4' (using password: NO)'
mysql@9f936ffd28b9:/$ echo $?
0
mysql@9f936ffd28b9:/$
This looks sensible. The exit code is 0 when the command is called with a host where MariaDB is running and 1 where not. I left out the password as this does not make sense when the user is not passed.
The zombie processes can't really be the fault of the command anyways. The processes do exit as otherwise they wouldn't be zombies. Therefore it must be Docker or Docker Compose itself, who are not properly waiting on their child processed.
Another idea is that this could be some kind of timeout issue. When I call mysqladmin -h gibtsnicht ping
then the process seems to hang. Maybe docker is giving up on reaping the child processes and when they eventually die they become zombies. Could you try:
healthcheck: test: mysqladmin -h db ping
in your otobo-base.yml file ?
Changing the healthcheck to
healthcheck: test: mysqladmin -h db ping
in the otobo-base.yml file doesnt create zombies anymore.
The health of the db container is now healthy:
1134c474098d mariadb:10.5 "docker-entrypoint.s…" 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp otobo_db_1
Cool, so it looks like this is DNS-related where in some installations localhost is known and in other instances in unknown. I will adapt the health check. This will be released in OTOBO 10.1 and in the next patch level release of OTOBO 10.0 if there is one.
Merged the PR. A quick test showed health status of the service 'db'. No zombies were seen. Clsoing this issue.
Issue description
ISSUE: mysqladmin zombie processes are appearing minutely that aren't reaped. The parent process is mysqld.
Steps to reproduce the issue
What's the expected result?
What's the actual result?
Additional details / screenshots
t