Symptoms
- Domain uses PHP FPM handler under Plesk > Domains > example.com > PHP Settings;
- When domain is renamed, corresponding PHP FPM service crashes:
# service plesk-php7X-fpm status
● plesk-php7X-fpm.service – The PHP 7.X FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/plesk-php70-fpm.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/plesk-php7X-fpm.service.d
└─limit_nofile.conf
Active: inactive (dead) - There are the following records in
/var/log/plesk-php7x-fpm/error.log
file:[25-Apr-2019 17:33:08] NOTICE: Reloading in progress ...
[25-Apr-2019 17:33:08] NOTICE: reloading: execvp("/opt/plesk/php/7.X/sbin/php-fpm", {"/opt/plesk/php/7.X/sbin/php-fpm", "--nodaemonize"})
[25-Apr-2019 17:33:08] NOTICE: using inherited socket fd=9, "/var/www/vhosts/system/example.com/php-fpm.sock"
...
[25-Apr-2019 17:33:08] ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
[25-Apr-2019 17:33:08] ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
[25-Apr-2019 17:33:08] ERROR: FPM initialization failed
[25-Apr-2019 17:33:08] ERROR: FPM initialization failed
...
[25-Apr-2019 17:33:14] NOTICE: fpm is running, pid 29906
[25-Apr-2019 17:33:14] NOTICE: ready to handle connections
[25-Apr-2019 17:33:14] NOTICE: systemd monitor interval set to 10000ms
Cause
Product issue:
-
#PPPM-10457 “The PHP-FPM service no longer crashes after the domain renaming.”
Fixed in:- Plesk Obsidian 04 June 2019 (fixed as PPP-42016, Linux)
Resolution
Workaround
If update is not possible for some reason you may try the following
workaround
If update is not possible for some reason, as a workaround add the following 2 scripts to the server and created events that will restart automatically the PHP-FPM handler:
-
Connect to the server via SSH
-
Download and extract the scripts domains-fpm.sh and subdomains-fpm.sh into the root directory.
# cd /root
# curl -LO https://plesk.zendesk.com/hc/article_attachments/360047065433/domains-fpm.tar.gz
# curl -LO https://plesk.zendesk.com/hc/article_attachments/360047065453/subdomains-fpm.tar.gz
# tar xf domains-fpm.tar.gz
# tar xf subdomains-fpm.tar.gz
-
Log into Plesk
-
Navigate to Tools & Settings > Event Manager > Add Event Handler
-
For Event select Default domain (the first domain added to a subscription) updated
-
In the command filed, add the following line:
/root/domains-fpm.sh
-
Press ok
Note: repeat steps 4,5,6 and 7, but this time for Events select “Domain updated”
-
Navigate to Tools & Settings > Event Manager > Add Event Handler
-
For Event select Subdomain of a default domain updated
-
In the command filed, add the following line:
/root/subdomains-fpm.sh
-
Press ok
Note: repeat steps 8,9,10 and 11, but this time for Events select “Subdomain updated”