...

Plesk php service repair - Service Temporarily Unavailable

If you have multiple domains with different php versions on one Plesk server, every now and then problems occur due to incorrect file creation by Plesk.

Domain holders will then see an error message, for example, when they call the website like

 class=
Web server error message due to a faulty service

The cause of the error

The reason for this message is in this case a not started php-fpm service, which can not 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 that case you can only independent take action and correct 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/ihrefirma.de/php-fpm.sock

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

This basically means that the domain ihrefirma.de 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/ihrefirma.de.conf

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

Current articles

A small network cabinet in a used equipment room, symbolizing the protection of accessible Linux services
Security

Fail2Ban Alternatives for Modern Linux Servers

CrowdSec, SSHGuard, and nftables take different approaches to security. The key factors are the attack surface, log sources, enforcement level, and the operational overhead that can be sustained over the long term.

A person is checking the mini-PC and router for an outgoing tunnel connection.
cloud computing

Cloudflare Tunnel as an Alternative to Port Forwarding

Cloudflare Tunnel makes internal web applications and selected administrative services accessible without requiring inbound port forwarding. Access rules, MFA, local permissions, and a clear logging policy remain critical.

A person is testing a network card on an open server for a specialized packet data path.
Technology

DPDK: Properly Planning Packet Processing in User Space

DPDK processes packets for selected NICs directly in userspace. This article explains polling, queue and NUMA scheduling, secure device binding, and how it differs from AF_XDP and the Linux kernel stack.