Score:0

Intermittent 503 timeouts on website due to PHP FPM "Attempt to connect to Unix domain socket failed"

ca flag

I have been experiencing intermittent site outages showing a 503 error. The site normally runs just fine. I've pinpointed it to the following error that gets spammed in my apache logs:

FCGI: attempt to connect to Unix domain socket /run/php/php7.3-fpm.sock (*) failed

When I run service php7.3-fpm restart, the site comes back up and everything runs fine.

When I run ps aux | grep php-fpm I get something like this:

root     20772  0.0  0.0 1152852 33600 ?       Ss   12:42   0:00 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
www-data 20773 10.6  0.1 1285072 250308 ?      S    12:42   2:34 php-fpm: pool www
www-data 20774  9.8  0.1 1271452 244952 ?      S    12:42   2:22 php-fpm: pool www
www-data 20775  9.8  0.1 1260964 219920 ?      S    12:42   2:22 php-fpm: pool www
// ... etc

Also, here is my permissions list in /run/php:

-rw-r--r-- 1 root     root     5 May 28 12:42 php7.3-fpm.pid
srw-rw---- 1 www-data www-data 0 May 28 12:42 php7.3-fpm.sock

I noticed that the master process is running as root. Is it supposed to be running as root? Could this be the issue?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.