Re: Apache2 PHP mod_fcgi HTTP 500 errors
David Birnbaum <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Stefan,
php seems to restart its children automatically from time to time, I suspect as
a way to get reclaim memory from leaks. Is it possible the problem is due to
the php process not completing its work when it receives the SIGTERM?
David.
-----
On Mon, 24 Oct 2005, Stefan Wendt wrote:
> Hi All,
>
> Any type of help on the following problem would be greatly appreciated.
>
> We thought everything is running smoothly until a few days ago. We discovered
> a few HTTP 500 errors in the access log file. The additional PHP error log
> file
> did not show any error message. So we ruled out a problem with the
> application.
> The problem occurs sporadic a few times each day since we installed the
> server with
> the required FCGI components.
>
> We currently using the following components on our server:
>
> Apache/2.0.54 (Debian GNU/Linux)
> mod_fastcgi/mod_fastcgi-SNAP-0404142202
> mod_suexec.so
> PHP 4.4.0
> (please note: all! configuration values for mod_fcgi and php_cgi are set to
> default
> except for PHP_FCGI_CHILDREN=10)
>
> It's hard to reproduce the problem, but putting heavy http load on the server
> produces
> the problem more frequently.
>
> I searched this mailing list and there seam to be similar cases, but none of
> the answers
> really solve the problem. Deploying fcgid seams to be the common fix, but I
> am
> not willing to give up on mod_fcgi just yet.
>
> I spend a lot of time last week figuring out what the root cause is and this
> is what I have:
>
> I think the information below shows quite clearly that the fcgi-pm(?)
> terminates the
> php process while 2 of it's child processes still work on a request.
>
> Thanks for having a look into this ...
> Stefan Wendt
>
> PS before failure
> ---
> test 10414 0.0 0.3 10552 3616 ? Ss 10:34 0:00 | \_
> /usr/local/php_fcgi_4.4.0/bin/php
> test 21061 8.5 0.9 14996 8748 ? S 11:01 0:12 | | \_
> /usr/local/php_fcgi_4.4.0/bin/php
> [... 9 more lines ]
> test 17287 0.0 0.3 10556 3620 ? Ss 10:54 0:00 | \_
> /usr/local/php_fcgi_4.4.0/bin/php
> test 17288 7.7 0.9 15004 8760 ? S 10:54 0:44 | | \_
> /usr/local/php_fcgi_4.4.0/bin/php
> [... 9 more lines ]
>
> Apache Access Logfile:
> ---
> [...]
> 81.169.x.x - - [24/Oct/2005:11:04:24 +0100] "GET
> /hotels/Test/bookings/client.php?formname=multi_day_availability HTTP/1.0"
> 200 49901 "-" "ApacheBench/2.0.41-dev"
> 81.169.x.x - - [24/Oct/2005:11:04:24 +0100] "GET
> /hotels/Test/bookings/client.php?formname=multi_day_availability HTTP/1.0"
> 500 698 "-" "ApacheBench/2.0.41-dev"
> 81.169.x.x - - [24/Oct/2005:11:04:24 +0100] "GET
> /hotels/Test/bookings/client.php?formname=multi_day_availability HTTP/1.0"
> 500 698 "-" "ApacheBench/2.0.41-dev"
> [...]
>
> global Apache Error Logfile:
> ---
> [Mon Oct 24 11:04:24 2005] [warn] FastCGI: (dynamic) server
> "/home/test/test.avvio.com/php-fcgi/php-fcgi-starter" (pid 17287) termination
> signaled
> [Mon Oct 24 11:04:24 2005] [warn] FastCGI: (dynamic) server
> "/home/test/test.avvio.com/php-fcgi/php-fcgi-starter" (pid 17287) terminated
> by calling exit with status '0'
>
>
> Trace of the PHP mother processes:
> ---
> somehost:~# strace -p 17287
> Process 17287 attached - interrupt to quit
> wait4(-1, 0xbfd44944, 0, NULL) = ? ERESTARTSYS (To be restarted)
> --- SIGTERM (Terminated) @ 0 (0) ---
> rt_sigaction(SIGTERM, {SIG_DFL}, NULL, 8) = 0
> kill(-17287, SIGTERM) = 0
> --- SIGCHLD (Child exited) @ 0 (0) ---
> exit_group(0) = ?
> Process 17287 detached
> ds80-237-153-8:~#
>
> PS after failure:
> ---
> test 10414 0.0 0.3 10552 3616 ? Ss 10:34 0:00 | \_
> /usr/local/php_fcgi_4.4.0/bin/php
> test 21061 8.7 0.9 14996 8748 ? S 11:01 0:14 | | \_
> /usr/local/php_fcgi_4.4.0/bin/php
> [... 9 more line ]
>
>
> ___________________________________
> fastcgi-developers mailing list
> http://fastcgi.com/fastcgi-developers/
>
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/