503 Error still when using installed PHP versions

SYSTEM INFORMATION
OS type and version AlmaLinux 9.4
Virtualmin version 7.20.2

I have posted this error before but I can explain a bit more about it in detail:

This only happens to PHP versions that I installed (Following the Documentation) so I got 2 other versions 7.4 and 8.1 those are what I installed now my problem is that every Sunday or weekly Log Rotation the PHP just stops working with a 503 error but with the stock PHP that is pre-installed that works fine, but when I restart the server or restart the broken services then it works fine

When I did the first post @llia made a post like this:
Go to System ⇾ Log File Rotation and replace the Commands to run after rotation for PHP-FPM in the relevant log file with:

systemctl reload php*fpm*

I thought this worked but I did not fully understand the problem at the time did someone else have similar issue like this?

So I am the only one that has this problem I have reinstalled Virtualmin multiple of times and always get the same issue

that won’t help as the error is with a system file & not virtualmin, maybe if you reinstalled your OS and then installed Virtualmin again you would have a clean system (I don’t recommend you do that).
where did you edit the log rotation ?
here


or somewhere else ?

A link back to that post might help us understand what the problem is - especially if that contains more information.

As you know a 503 Service Unavailable Error indicates that a web server is temporarily unable to handle a request.

So I presume you have checked your webserver is running, and examined the logs to find out why it has stopped.

Also what is running on the webserver - what application caused it to stop. It will not be “Log Rotation” but it could be something that the application is trying to perform that is locking the file during the rotation (perhaps a backup) what is the system trying to do on Sunday/weekly

Most of my websites are running on PHP 8.0, as it’s the default version pre-installed with Virtualmin and works reliably with WordPress. I have only one WordPress site on PHP 7.4 due to an outdated theme that isn’t compatible with PHP 8.0. Additionally, I have invoicing software that runs on PHP 8.1 because it doesn’t support 8.0; it’s used by only one user—myself.

When failures occur, they happen simultaneously on both PHP 7.4 and 8.1. I have backups scheduled on Sundays, but I can’t understand why these issues would affect only those two PHP versions. I don’t have any custom cron jobs set up.

here is a apache error log:

[Thu Sep 26 11:54:41.413535 2024] [proxy_fcgi:error] [pid 511933:tid 511974] [client 121.229.156.88:39955] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:54:41.413448 2024] [proxy:error] [pid 511933:tid 511974] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:47:41.579893 2024] [proxy_fcgi:error] [pid 511933:tid 511965] [client 66.249.64.169:36401] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:47:41.579815 2024] [proxy:error] [pid 511933:tid 511965] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:43:26.300065 2024] [proxy_fcgi:error] [pid 511721:tid 511833] [client 66.249.89.232:49861] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:43:26.300036 2024] [proxy:error] [pid 511721:tid 511833] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:43:26.292577 2024] [proxy_fcgi:error] [pid 511719:tid 511863] [client 66.249.64.168:59597] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:43:26.292462 2024] [proxy:error] [pid 511719:tid 511863] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:39:30.051538 2024] [proxy_fcgi:error] [pid 511721:tid 511849] [client 112.86.225.252:35777] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:39:30.051485 2024] [proxy:error] [pid 511721:tid 511849] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:38:41.573291 2024] [proxy_fcgi:error] [pid 511719:tid 511843] [client 66.249.64.167:37385] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:38:41.573255 2024] [proxy:error] [pid 511719:tid 511843] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:38:41.539561 2024] [proxy_fcgi:error] [pid 511719:tid 511870] [client 66.249.64.167:54663] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:38:41.539481 2024] [proxy:error] [pid 511719:tid 511870] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:35:56.336070 2024] [proxy_fcgi:error] [pid 511719:tid 511883] [client 66.249.64.168:35309] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:35:56.336040 2024] [proxy:error] [pid 511719:tid 511883] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:35:56.295551 2024] [proxy_fcgi:error] [pid 511719:tid 511839] [client 66.249.89.233:40714] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:35:56.295439 2024] [proxy:error] [pid 511719:tid 511839] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:28:26.291403 2024] [proxy_fcgi:error] [pid 511933:tid 511964] [client 66.249.64.168:46434] AH01079: failed to make connection to backend: httpd-UDS
[Thu Sep 26 11:28:26.291358 2024] [proxy:error] [pid 511933:tid 511964] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (*:80) failed
[Thu Sep 26 11:28:26.281617 2024] [proxy_fcgi:error] [pid 511721:tid 511882] [client 66.249.89.232:39421] AH01079: failed to make connection to backend: httpd-UDS

I cant make sense out of it

Also when I do a force log rotation the same thing happens no matter what day it is

I seen this issue before, you need to remove a line in the config that looks for this location.
Do you have a virtual server using that number.

You can see in the manual edit.

I run rocky 9 and I don’t have the /run/php-fpm/ location.

Thanks for your help
this is on my config what must I remove?

[1718793774442731]
user = frankdoesthemmacarena
group = frankdoesthemmacarena
listen.owner = frankdoesthemmacarena
listen.group = frankdoesthemmacarena
listen.mode = 0660
listen = /run/php-fpm/1718793774442731.sock
pm = dynamic
pm.max_children = 16
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 8
php_value[upload_tmp_dir] = /home/frankdoesthemmacarena/tmp
php_value[session.save_path] = /home/frankdoesthemmacarena/tmp
php_value[log_errors] = On
php_value[error_log] = /home/frankdoesthemmacarena/logs/php_log

Sorry, I reread it and understood what you said thanks let me try that

Hmmm, your config is not like I have, all my domains are located /etc/opt/remi/
Is this config is for a working domain?

That makes sense I could be doing something wrong I did follow the documentation multiple of times to make sure I am installing other PHP versions correctly reinstalling the whole server and doing it over again and still the same thing. I don’t know :neutral_face:

I have deleted the line and will see it from now

I have removed it the sites are down after the change

I wouldn’t change unless its not a working domain.

did you use this docs

Yes I did this doc

Alma must be different, not sure why it would be. Do you also have the /etc/opt/remi/ location?

No, I installed RockyLinux before AlmaLinux to see if there is any difference and it’s doing the same thing

I would assume Debian would be my next choice

Right, do you pre install anything?

Late here, I will try a fresh tomorrow.

I only do the update for the OS and then directly using the virtualmin installer

I wouldn’t “clean” means squeaky clean. nothing added
I would do the updates after Virtualmin (I believe it will do some during the install)

I just installed new (use Rocky from snapshot) virtualmin I saw a /run/php-fpm/ before running the the docs to mulit php and post-install config of virtualmin. After that that folder was gone and the first virtual server used /etc/opt/remi/ folder.
I will try on Alma.