Challenges with PHP-FPM: FCGI: attempt to connect to Unix domain socket fail
My problem is similar to the one on this thread, but the not entirely - so I created this new thread.
I wanted to override the fpm pool config. So I updated /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml as so:
And /var/cpanel/ApachePHPFPM/system.yaml:
I then ran /scripts/php_fpm_config --rebuild --domain=mydomain.com This semed to go okay:
But I immediately got the following errors in the apachelog
Per the other thread - I did check that the directorys and files for the sockets existed. They did. So I'm not sure how to approach?
pm: dynamic
pm_max_children: 25
pm_spare_servers: 2
pm_start_servers: 2
pm_max_spare_servers: 3
pm_max_requests: 250
pm_process_idle_timeout: 10
slowlog: /var/logs/apache2/slowlog
request_slowlog_timeout: { name: 'php_admin_value[request_slowlog_timeout]', value: 10s }And /var/cpanel/ApachePHPFPM/system.yaml:
daemonize: yes
emergency_restart_threshold: 10
emergency_restart_interval: 1m
process_control_timeout: 10I then ran /scripts/php_fpm_config --rebuild --domain=mydomain.com This semed to go okay:
root@vps [/var/cpanel/ApachePHPFPM]# /scripts/php_fpm_config --rebuild --domain=mydomain.com
info [php_fpm_config] rebuild_files: working on domain (mydomain.com)
info [php_fpm_config] php-fpm: rebuild_files: restart fpm services for Apache
info [php_fpm_config] php-fpm: fpm services restarted
info [php_fpm_config] Rebuilding apache conf
info [php_fpm_config] ensure_all_fpm_versions_start_on_reboot: started
info [php_fpm_config] php-fpm: rebuild_files: attempting to have ea-php71-php-fpm start on reboot
info [php_fpm_config] ensure_all_fpm_versions_start_on_reboot: completedBut I immediately got the following errors in the apachelog
[Sat May 13 12:38:18.315586 2017] [proxy:error] [pid 20550:tid 139889074964224] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php71/root/usr/var/run/php-fpm/e052082a6e5649ecf631cbb5460a54c838adacd4.sock (*) failed
[Sat May 13 12:38:18.315669 2017] [proxy_fcgi:error] [pid 20550:tid 139889074964224] [client 213.233.148.8:57683] AH01079: failed to make connection to backend: httpd-UDS, referer: xxxxxx
[Sat May 13 12:38:19.648054 2017] [proxy:error] [pid 20493:tid 139889179862784] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php71/root/usr/var/run/php-fpm/e052082a6e5649ecf631cbb5460a54c838adacd4.sock (*) failedPer the other thread - I did check that the directorys and files for the sockets existed. They did. So I'm not sure how to approach?
-
I also looked at the socket.... and all seemed to be in order.. myuser is the domain owner. (not sure what that '=' sign is at the end though.) srw-rw---- 1 myuser nobody 0 May 13 17:13 e052082a6e5649ecf631cbb5460a54c838adacd4.sock= 0 -
Consider this solved. Although I'm still not positive why. I eventually started overriding the specific domain pool instead of the system pool. Had the same problem... so I changed one config option at a time. Each one worked fine until I had them all the way I wanted. In retrospect - I must have had some kind of formatting issue in the beginning... (I was cutting and pasting from a text file via putty-ssh). 0 -
Hello, Thank you for the update. Formatting is important, and sometimes when pasting into PuTTY it is easy to paste in extra characters. 0
Please sign in to leave a comment.
Comments
3 comments