FastCGI and Apache 500 error intermittently
Posted
by
benkorn1
on Server Fault
See other posts from Server Fault
or by benkorn1
Published on 2011-01-07T17:35:07Z
Indexed on
2012/06/29
21:18 UTC
Read the original article
Hit count: 383
I have a FastCGI (mod_fastcgi)problem. It happens every once in a while, and does not casue a complete server meltdown, just 500 errors. Here are a couple things. First I am using APC so PHP is in control of it's own processes, not FastCGI. Also, I have the webroot set as:
/var/www/html
And the fcgi-bin inside:
/var/www/html/fcgi-bin
First off here is the apache error_log:
[Fri Jan 07 10:22:39 2011] [error] [client 50.16.222.82] (4)Interrupted system call: FastCGI: comm with server "/var/www/html/fcgi-bin/php.fcgi" aborted: select() failed, referer: http://www.domain.com/
I also ran strace on the 'fcgi-pm' process. Here is a snip from the trace around the time it bombs out:
21725 gettimeofday({1294420603, 14360}, NULL) = 0
21725 read(14, "C /var/www/html/fcgi-bin/php.fcgi - - 6503 38*", 16384) = 46
21725 alarm(131) = 0
21725 select(15, [14], NULL, NULL, NULL) = 1 (in [14])
21725 alarm(0) = 131
21725 gettimeofday({1294420603, 96595}, NULL) = 0
21725 read(14, "C /var/www/html/fcgi-bin/php.fcgi - - 6154 23*C /var/www/html/fcgi-bin/php.fcgi - - 6483 28*", 16384) = 92
21725 alarm(131) = 0
21725 select(15, [14], NULL, NULL, NULL) = 1 (in [14])
21725 alarm(0) = 131
21725 gettimeofday({1294420603, 270744}, NULL) = 0
21725 read(14, "C /var/www/html/fcgi-bin/php.fcgi - - 5741 38*", 16384) = 46
21725 alarm(131) = 0
21725 select(15, [14], NULL, NULL, NULL) = 1 (in [14])
21725 alarm(0) = 131
21725 gettimeofday({1294420603, 311502}, NULL) = 0
21725 read(14, "C /var/www/html/fcgi-bin/php.fcgi - - 6064 32*", 16384) = 46
21725 alarm(131) = 0
21725 select(15, [14], NULL, NULL, NULL) = 1 (in [14])
21725 alarm(0) = 131
21725 gettimeofday({1294420603, 365598}, NULL) = 0
21725 read(14, "C /var/www/html/fcgi-bin/php.fcgi - - 6179 33*C /var/www/html/fcgi-bin/php.fcgi - - 5906 59*", 16384) = 92
21725 alarm(131) = 0
21725 select(15, [14], NULL, NULL, NULL) = 1 (in [14])
21725 alarm(0) = 131
21725 gettimeofday({1294420603, 454405}, NULL) = 0
I noticed that the 'select()' seems to stay the same regardless, however the read() changes its return from 46 to some other number while it is bombing out. Has anyone seen anything like this. Could this be some sort of file locking?
Thanks, Ben
© Server Fault or respective owner