FastCGI: failed to connect to server in the apache error log

marson

Verified User
Joined
Jan 30, 2012
Messages
54
Hello

First of all I am sorry for my poor english and secondly Hello every one it is my first post on Directadmin forum and I would like to kindly ask for help.

I have Directadmin install using custombuild 2.0 with apache 2.4 and php 5.3 compiled as php-fpm mode. Everything worked fine but few days ago our clients get Internal 500 error on theirs websites and we can see the following on the domain logs

Code:
[Sun Dec 29 04:17:37.314194 2013] [fastcgi:error] [pid 543813:tid 140067767039744] (2)No such file or directory: [client 66.249.78.56:47754] FastCGI: failed to connect to server "/home/spaceadmin/domains/spacehost.pl/public_html/php53-fpm": connect() failed
[Sun Dec 29 04:17:37.314228 2013] [fastcgi:error] [pid 543813:tid 140067767039744] [client 66.249.78.56:47754] FastCGI: incomplete headers (0 bytes) received from server "/home/spaceadmin/domains/spacehost.pl/public_html/php53-fpm"
[/CODE

after that I have to restart httpd and php-fpm by doing service httpd restart and service php-fpm53 restart and that solve the problem for some time and all sites start working as expected for some time. Sometimes it is couple of minutes sometimes couple hours. When this error occur it is displayed on all sites not only that I posted in the log, and the posted snipped of log is only an example.
Additionally we use Cloudlinux to limit the resource per clients and I also installed APC
 
CloudLinux installs /etc/cron.d/kill_orphaned_php-cron which causes this issue

Hello,

Since you mention you use CloudLinux, do you have a file:
/etc/cron.d/kill_orphaned_php-cron
?
This is the cause of the problem. It kills the php-fpm master process, and this causes these fastcgi errors and intermittent Internal Server Error.
Perhaps the Custombuild 2.0 should be changed to check for the existance of the script that is installed by CloudLinux.
See also: http://cloudlinux.com/solutions/forum/forum18/topic711/

Dolphi
 
Back
Top