zabbix/zabbix-docker

Long container stop via "docker stop ... "

skorobkov opened this issue · 1 comments

When docker stops container it sends SIGTERM signal to PID 1 (/bin/bash), but bash ignores this signal and dont propogate it to its child (/usr/bin/supervisord). This leads to long waiting (10 seconds) before docker send KILL signal.
Maybe in run_zabbix_component.sh you should change

/usr/bin/supervisord -c /etc/supervisor/supervisord.conf

to

exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf

then supervisord will replace bash process and become PID 1. After that supervisord can catch the SIGTERM signall and shutdowns normaly.

fixed