Description
php-fpm.service doesn't set KillMode ([Service] section), so it uses control-group, which sends SIGTERM to all processes in the service's cgroup. For php-fpm, where the master process manages child workers, KillMode=mixed is generally better. It sends SIGTERM only to the master process, letting it handle child termination gracefully. If the master doesn't exit within TimeoutStopSec, systemd sends SIGKILL to all processes in the cgroup. If the master exits but leaves child processes behind, systemd sends SIGKILL to clean them up. The mixed option has been supported since systemd 209, which is quite old, so compatibility isn't an issue. More details can be found in the systemd.kill(5) man page.
Thanks!
Description
php-fpm.servicedoesn't setKillMode([Service]section), so it usescontrol-group, which sends SIGTERM to all processes in the service's cgroup. For php-fpm, where the master process manages child workers,KillMode=mixedis generally better. It sends SIGTERM only to the master process, letting it handle child termination gracefully. If the master doesn't exit withinTimeoutStopSec, systemd sends SIGKILL to all processes in the cgroup. If the master exits but leaves child processes behind, systemd sends SIGKILL to clean them up. Themixedoption has been supported since systemd 209, which is quite old, so compatibility isn't an issue. More details can be found in thesystemd.kill(5)man page.Thanks!