Repair Plesk php Service - Service Temporarily Unavailable

plesk php error

Running multiple domains with different php versions on a Plesk server sometimes causes problems caused by incorrect file creation by Plesk.

For example, domain owners will see an error message when they visit the website

Error message from the web server 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 that can not restart due to a bad file in the configuration. These files are managed by the Plesk service. Sometimes it happens that they are not deleted or not created properly. In that case you can only act independently and solve the problem.

Find and fix errors

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

In this example, all you have to do is search for the logfiles of the php-fpm service. If you know the php version of the user you can simply query directly the protocol of the service. Alternatively, you can also simply query all services simultaneously and eliminate errors.

Example under Centos7:

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

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

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

That basically means that the Domain Your company was apparently still loaded in a different php-fpm configuration, so for the domain possibly the php version was changed from php5.6 to another. In that case Plesk did not manage to remove the original configuration file. The php-fpm service can not be restarted then.

the solution of the problem

Remove the faulty file from the php-fpm configuration of the server.

Example for Centos7:

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

Then 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 enter your comment!
Please enter your name here