Symptoms
-
Website is showing the following error:
503 Service Temporarily Unavailable
-
The following errors are shown in
/var/log/plesk/panel.log
log file:PLESK_INFO: [proxy:error] [pid 12966] AH00959: ap_proxy_connect_backend disabling worker for (127.0.0.1) for 60s
[proxy_fcgi:error] [pid 12966] [client 203.0.113.2:53377] AH01079: failed to make connection to backend: 127.0.0.1, referer: https://example.com/ - The website is using PHP-FPM handler at Domains > example.com > PHP Settings
-
The following errors can be found in the website
error_log
file at/var/www/vhosts/example.com/logs/error_log
:PLESK_INFO: [proxy:error] [pid 3838:tid 140126940247808] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/example.com/php-fpm.sock (*) failed
[proxy_fcgi:error] [pid 3838:tid 140126940247808] [client 203.0.113.2:56904] AH01079: failed to make connection to backend: httpd-UDS
Cause
PHP-FPM service is stopped.
Resolution
Warning: To apply these steps is required access to the server as Plesk administrator. If you don’t have admin access, please contact your service provider.
Click on a section to expand
Via Plesk GUI
- Check what version of PHP is used by domain at Domains > example.com > PHP Settings
-
Go to Tools & Settings > Services Management
-
Start the PHP-FPM service with the required version. For example the Plesk PHP-FPM 7.3 service:
Via SSH (Single Domain)
-
Connect to the server via SSH
-
Get the PHP-FPM version assigned to the domain:
# plesk db “SELECT d.name,h.php_handler_id FROM domains d JOIN hosting h on h.dom_id=d.id WHERE d.name=’example.com‘”
+————-+—————-+
| name | php_handler_id |
+————-+—————-+
| example.com | plesk-php73-fpm |
+————-+—————-+ -
Start the PHP-FPM service with the required version. For example the Plesk PHP-FPM 7.3 service:
# service plesk-php73-fpm restart
Via SSH (Multiple Domains)
-
Connect to the server via SSH
-
Restart all the enabled PHP-FPM services:
# for PHP in `systemctl list-unit-files | grep enabled | grep php.*fpm | awk ‘{print $1}’`; do echo -e “PHP-FPM service:t$PHP”; echo -e “Status:t$(systemctl is-active $PHP)”; echo -e “Restarting…”; systemctl restart $PHP; echo -e “Status:t$(systemctl is-active $PHP)n”; done
Additional Information
Domain does not work on PHP-FPM on Plesk: 503 service unavailable