[Tue Aug 06 12:16:49.136937 2024] [proxy:error] [pid 1017346:tid 1017429] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/171399817375535.sock (*:80) failed
[Tue Aug 06 12:15:20.320596 2024] [proxy_fcgi:error] [pid 1017346:tid 1017489] [client 81.5.173.63:36202] AH01079: failed to make connection to backend: httpd-UDS
^^ from the apache error log of one of the sites on this server.
Reverse proxies unaffected, just PHP applications - namely in this case WordPress.
Happens after a while, corrected only by restarting PHP-FPM
Going to any webpage served during this time shows:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
LXC container, instead of bare metal or normal VM. Shouldn’t be the contributing factor here as run many virtual min servers this way but mentioning it incase.
So you can see /run/php-fpm/ in the file manager. All people reporting the error are using the directory in the config.
How are you installing php versions, are you following the docs.
Installing additional PHP versions
On RHEL, Alma, Rocky, Oracle, CentOS Stream and Fedora Linux
Install Remi repository
. /etc/os-release && repo_dir=$([ "$ID" = "fedora" ] && echo "fedora" || echo "enterprise") && dnf -y install "https://rpms.remirepo.net/$repo_dir/remi-release-$(rpm -E %$ID).rpm" && dnf clean all
Install PHP packages
dnf install php81-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}
Replace php81 with the desired PHP version, e.g., php83.
Check available PHP versions and extensions in the Remi Repository or use dnf search php.
This I did do
for php in $(scl list-collections 2>/dev/null | grep 'php' | sed 's/$/-php/') php; do for ext in curl intl; do sudo dnf -y install "${php}-${ext}"; done; done