You are not logged in.
As subject, stopping php-fpm service started to take three minutes after systemd was updated recently.
Enabled debug in configuration file and php-fpm was stopping immediately. However the systemctl stop command runs for a further three minutes before ending. No error exit code but status after stop says Active: failed (Result: timeout).
# systemctl status php-fpm
php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled)
Active: failed (Result: timeout) since Sat 2013-09-21 16:06:12 BST; 2min 57s ago
Main PID: 421
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
This also of course slows down shutdown.
Any thoughts or ideas?
Offline
I had the same problem, I changed /usr/lib/systemd/system/php-fpm.service to read as:
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target
[Service]
Type=notify
PIDFile=/run/php-fpm/php-fpm.pid
PrivateTmp=true
ExecStart=/usr/bin/php-fpm --daemonize --pid /run/php-fpm/php-fpm.pid
ExecReload=/bin/kill -USR2 $MAINPID
[Install]
WantedBy=multi-user.target
Note the change from --nodaemonize to --daemonize. This caused 'systemctl start php-fpm' to take slightly more time than when using --nodaemonize but resulted in 'systemctl stop php-fpm' being near instantaneous. I figured the trade off for the delay at startup was acceptable to prevent a 3 minute delay during shutdown.
Last edited by pilgrim85 (2013-09-21 19:28:54)
Offline
Thanks pilgrim85 that workaround works well for me too.
Offline
The "fake" timeout is a bug in systemd relative to Type=notify service, this patch should solved it.
Offline
The "fake" timeout is a bug in systemd relative to Type=notify service, this patch should solved it.
Sorry but I don't know how to apply the patch. I can't find /src/core/service.c anywhere.
Offline
It's a patch for systemd, see https://bugs.archlinux.org/task/37007
Offline