Apache Service Unavailable 503

Spread the love

(111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.2-fpm.sock (*) failed

 


I have running WordPress in my local and I got the error Service Unavailable in the browser while accessing the website. Here are the steps that show how I have resolved this error, Generally this type of error happens due to php-fpm service. In this article I will explain you how to resolve Apache service unavailable error 503.

 
Error in Apache logs :

[Wed Feb 15 09:58:45.658143 2023] [proxy:error] [pid 1266] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.2-fpm.sock (*) failed

[Wed Feb 15 09:58:45.658172 2023] [proxy_fcgi:error] [pid 1266] [client 192.168.1.84:45230] AH01079: failed to make connection to backend: httpd-UDS

Reason and Solutions :

1. If your php-fpm service is not started. You need to check the service if it is running or not.
 

service php8.2-fpm status
service php8.2-fpm restart

 
2. If another service already using the FPM instance. In my case I have installed WordPress and also using Zabbix service in apache, I wasn’t able to open my WordPress locally due to this error `ERROR: Another FPM instance seems to already listen on /var/run/php/zabbix.sock`. You can check it with the below command.
 

service php8.2-fpm status

 


× php8.2-fpm.service – The PHP 8.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php8.2-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-02-15 09:39:12 IST; 20min ago
Docs: man:php-fpm8.2(8)
Main PID: 981 (code=exited, status=78)
CPU: 65ms

Feb 15 09:39:09 vishalvyas systemd[1]: Starting The PHP 8.2 FastCGI Process Manager…
Feb 15 09:39:10 vishalvyas php-fpm8.2[981]: [15-Feb-2023 09:39:10] ERROR: Another FPM instance seems to already listen on /var/run/php/zabbix.sock
Feb 15 09:39:10 vishalvyas php-fpm8.2[981]: [15-Feb-2023 09:39:10] ERROR: FPM initialization failed
Feb 15 09:39:12 vishalvyas systemd[1]: php8.2-fpm.service: Main process exited, code=exited, status=78/CONFIG
Feb 15 09:39:12 vishalvyas systemd[1]: php8.2-fpm.service: Failed with result ‘exit-code’.
Feb 15 09:39:12 vishalvyas systemd[1]: Failed to start The PHP 8.2 FastCGI Process Manager.

 

I just deleted the `zabbix.sock` file from the location `/var/run/php` and restart the php8.2-fpm service, I am able to open my WordPress site after restarting the service.

 

If you enjoyed this post and found it useful, please buy me a coffee using this link : https://www.buymeacoffee.com/imvishalvyas 😀

 

Linuxguru
See also  How To Fix Apache 403 Forbidden Error

Leave a Comment