Author Topic: Php-FPM 7.4 users sock not created after user subscription  (Read 2080 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Php-FPM 7.4 users sock not created after user subscription
« on: October 13, 2022, 04:49:34 AM »
Hi, this is my first post in this forum.

My users complaining why their sites turn error Service Unavailable - The Server is temporary unable to service your request blablabla. So, i digged around in server. Inside mod_security_audit.log i found that apache is complaining about php-fpm sock not found for this user.

Apache-Error: [file "mod_proxy_fcgi.c"] [line 1200] [level 3] AH01079: failed to make connection to backend: %s
Apache-Handler: proxy:unix:/opt/alt/php-fpm74/usr/var/sockets/USERNAME.sock|fcgi://localhost

i checked php-fpm/users folder, there is NO USERNAME.conf file that i thought it will be generated from template (Webserver Settings >  Webserver Template Editor).

Why that php-fpm per user is not created ? any suggestion? It is painful for me, everytime new user is registered and subscribed, i have to manually create that file :(

My stack is NGINX + APACHE + PHP-FPM .
I also using CWP.Pro
Centos 7 - inside LXC

Offline
*
Re: Php-FPM 7.4 users sock not created after user subscription
« Reply #1 on: May 10, 2023, 08:39:50 AM »
I have the same issue, any updates?

Offline
*
Re: Php-FPM 7.4 users sock not created after user subscription
« Reply #2 on: May 10, 2023, 08:52:29 AM »
Wed May 10 15:50:42.171383 2023] [proxy:error] [pid 38808:tid 140677358810880] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/alt/php-fpm7.4/usr/var/sockets/mysite.sock (*:80) failed
[Wed May 10 15:50:42.171412 2023] [proxy_fcgi:error] [pid 38808:tid 140677358810880] [client 10.254.0.23:60852] AH01079: failed to make connection to backend: httpd-UDS

Offline
****
Re: Php-FPM 7.4 users sock not created after user subscription
« Reply #3 on: May 11, 2023, 03:16:03 AM »
Newly installed versions of php-fpm do not create a conf file for you, which in turn causes php-fpm to generate the per-user .sock. You will need to bring forward your existing php-fpm configuration and edit it to reflect the proper PHP version, then restart that version of PHP. Here is an example of copying a PHP 7.1 configuration to 7.4:
Code: [Select]
cp /opt/alt/php-fpm71/usr/etc/php-fpm.d/users/user.conf /opt/alt/php-fpm74/usr/etc/php-fpm.d/users/user.conf
perl -pi -e 's/php-fpm71/php-fpm74/g' /opt/alt/php-fpm74/usr/etc/php-fpm.d/users/user.conf
service php-fpm74 restart

Offline
*
Re: Php-FPM 7.4 users sock not created after user subscription
« Reply #4 on: June 17, 2023, 07:13:57 PM »
I have the same issue, and i've created it myself.. not just that, but the config files also will probably get removed once you restart your server and you'll need to create them manually.. Like many things in this control panel you'll need to do it manually!

Edit: to add more context on the issue, look for creating "sock" files, I don't actually remember the code rn.
« Last Edit: June 17, 2023, 07:15:47 PM by licode »