The plesk-php7x-fpm service crashes during the reload after domain name change? How to resolve
As part of our Server Management Services, we assist our customers with several PHP queries.
Today, let us see how to resolve the error.
Cause for plesk-php7x-fpm service crashes during the reload after domain name change
This is due to a Plesk bug, which is fixed in Plesk Obsidian.
- 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-2021 17:33:08] NOTICE: Reloading in progress …
[25-Apr-2021 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-2021 17:33:08] NOTICE: using inherited socket fd=9, “/var/www/vhosts/system/example.com/php-fpm.sock”
…
[25-Apr-2021 17:33:08] ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
[25-Apr-2021 17:33:08] ERROR: Another FPM instance seems to already listen on /var/www/vhosts/system/example.com/php-fpm.sock
[25-Apr-2021 17:33:08] ERROR: FPM initialization failed
[25-Apr-2021 17:33:08] ERROR: FPM initialization failed
…
[25-Apr-2021 17:33:14] NOTICE: fpm is running, pid 29906
[25-Apr-2021 17:33:14] NOTICE: ready to handle connections
[25-Apr-2021 17:33:14] NOTICE: systemd monitor interval set to 10000ms
Solution for plesk-php7x-fpm service crashes during the reload after domain name change
Today, let us see how our support Techs resolved the issue.
The solution is to update Plesk.
To update Plesk via the Plesk interface:
1. In Plesk, go to Tools & Settings and click Updates and Upgrades.
2. Then, on the Updates and Upgrades page, click Update Components.
3. Finally, click Continue to begin the update procedure.
To update Plesk via a command-line interface:
1. Firstly, connect to a Plesk server via SSH (Linux)/RDP (Windows Server).
2. Then, run Plesk Installer Update (on Windows Server, start a command prompt as an Administrator):
# plesk installer update
During the update process:
- Plesk may go offline for several minutes, if updates require a Plesk restart
- Websites will stay online
- If a service component is going to be updated, its service will be restarted.
To find out what Plesk update is currently installed on the system, go to the Home page > System Overview.
Alternatively, execute the following command in a command-line interface:
plesk version
If update is not possible for some reason, follow the steps given below:
As a workaround, add the following 2 scripts to the server and created events that will restart automatically the PHP-FPM handler.
1. Firstly, connect to the server via SSH
2. Then, 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
3. Next, log into Plesk.
4. later, navigate to Tools & Settings > Event Manager > Add Event Handler.
5. For Event select Default domain (the first domain added to a subscription) updated.
6. Then, in the command filed, add the following line:
# /root/domains-fpm.sh
7. Press OK.
Repeat steps 4,5,6 and 7, but this time for Events select “Domain updated”
8. Navigate to Tools & Settings > Event Manager > Add Event Handler
9. For Event select Subdomain of a default domain updated.
10. In the command field, add the following line:
# /root/subdomains-fpm.sh
11. Finally, press ok
Repeat steps 8,9,10 and 11, but this time for Events select “Subdomain updated”
[Stuck with the error still? We are here for you]
Conclusion
Today, we saw an effective method our Support Techs employ to fix it.
0 Comments