Re: FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi" aborted: idle timeout (30 sec), FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5-fcgi"

5,184 views
Skip to first unread message

Felipe

unread,
Feb 1, 2013, 7:31:29 AM2/1/13
to highloa...@googlegroups.com
Use -idle-timeout paramater on "FastCgiExternalServer" line to solve this problem.

My FastCgiExternalServer line:
FastCgiExternalServer /var/run/fastcgi/USERNAME-fcgi -appConnTimeout 10 -idle-timeout 250 -socket /var/run/fastcgi/USERNAME.socket -pass-header Authorization

More information in mod_fastcgi doc:
http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html


2013/2/1 John H <john....@gmail.com>
Hi all, 
I cannot track down what is causing this error! I get the following on a regular basis, plus I have extremely high CPU usage too (around 80%)!

[Fri Feb 01 11:51:43 2013] [error] [client xx.xx.xx.xx] FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi" aborted: idle timeout (30 sec), referer: http://mydomain.com/
[Fri Feb 01 11:51:43 2013] [error] [client xx.xx.xx.xx] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5-fcgi", referer: http://mydomain.com/


I have apache2 installed with php-fpm on an amazon m1.large ec2 ubuntu 64 12.04 server.
7.5 GiB memory
4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)
64-bit platform
I/O Performance: High

I also have APC installed and set to use up to 1gig of ram

Here is some of my config settings:
/etc/apache2/httpd.conf 
<IfModule mod_fastcgi.c>
        AddHandler php5-fcgi .php
        Action php5-fcgi /php5-fcgi
        Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
        FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /tmp/php5-fpm.sock -pass-header Authorization
</IfModule>
 

/etc/apache2/apache.conf

MaxKeepAliveRequests    100
KeepAliveTimeout        5
# prefork MPM
<IfModule mpm_prefork_module>
        StartServers    5
        MinSpareServers 5
        MaxSpareServers 10
        MaxClients      150
        MaxRequestsPerChild     0
</IfModule>

<IfModule mpm_event_module>
        StartServers    2
        MinSpareThreads 25
        MaxSpareThreads 75
        ThreadLimit     64
        ThreadsPerChild 25
        MaxClients      150
        MaxRequestsPerChild     0
</IfModule>

/etc/php5/fpm/php-fpm.conf  
pid = /var/run/php5-fpm.pid


/etc/php5/fpm/pool.d/www.conf

listen = /tmp/php5-fpm.sock
  
pm = dynamic
pm.max_children =150
pm.start_servers = 75
pm.min_spare_servers = 20
pm.max_spare_servers = 150


Can anyone help?
John

--
 
---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Atenciosamente;
Felipe Braz
Linux User # 323052

John H

unread,
Feb 1, 2013, 5:33:17 PM2/1/13
to highloa...@googlegroups.com
Great! now I just need to find out why or what is causing php-fpm to eat up my CPU so much.
John
Reply all
Reply to author
Forward
0 new messages