Plesk php service repair - Service Temporarily Unavailable

When running multiple domains with different php versions on one Plesk server, you may experience problems caused by incorrect file creation by Plesk.

Domain owners will then see, for example, an error message when calling up the website such as

Web server error message due to a faulty service

The cause of the error

The reason for this message in this case is a non-started php-fpm service which cannot restart due to a faulty file in the configuration. These files are managed by the Plesk service. Sometimes it happens that they are not deleted or not created correctly. In this case you can only act on your own and fix the problem.

Finding and correcting errors

You can easily find the mistake in such a case. Error logs are written for each service and often show the problem.

In this example you only have to go to the search for the log files of the php-fpm service. If you know the php version of the user, you can simply look up the log of the service directly. Alternatively, you can also just check all services at once and fix bugs.

Example under Centos7:

tail -f /var/log/plesk-php56-fpm/error.log

[07-Jun-2019 09:40:15] ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/

[07-Jun-2019 09:40:15] ERROR: FPM initialization failed

This basically means that the domain was obviously loaded in a different php-fpm configuration, i.e. the php version of the domain may have been changed from php5.6 to another. In this case, Plesk has not been able to remove the original configuration file. The php-fpm service cannot be restarted.

Solution of the problem

Remove the broken file from the server's php-fpm configuration.

Example for Centos7:

rm -rf /opt/plesk/php/5.6/etc/php-fpm.d/

After that you should see the successful restart directly in the error log of the defective service.

tail -f /var/log/plesk-php56-fpm/error.log

[07-Jun-2019 09:42:04] NOTICE: fpm is running, pid 120959

[07-Jun-2019 09:42:04] NOTICE: ready to handle connections

07-Jun-2019 09:42:04] NOTICE: systemd monitor interval set to 10000ms

Please divide the contribution
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp
Share on telegram
Latest posts

Recommended videos from our Youtube Channel