ID:               41593
 Comment by:       dan at sypher7 dot com
 Reported By:      jonepet at dcvhost dot no
 Status:           No Feedback
 Bug Type:         CGI related
 Operating System: Linux
 PHP Version:      5.2.3
 Assigned To:      dmitry
 New Comment:

I was able to reproduce this in the 4.4.8 version of PHP using the
latest mod_fastcgi and Apache 1.3.

>From what I understand, a graceful reload sends a SIGUSR1 to Apache.
The  FastCGI processor manager then sends SIGTERMs to all of the running
processes.

Instead of exiting cleanly, the PHP script ends abruptly and doesn't
even finish sending headers. Here is what Apache's log had to say about
it:

 FastCGI: incomplete headers (0 bytes) received from server
"/path/to/php-fcgi-wrapper"

I've tried messing with the FastCgiConfig settings a lot, but nothing
in there appears to be changing the result.

I do not know either codebase well, so I can't say with certainty if
this is a mod_fastcgi or PHP bug. It would appear that either PHP isn't
closing out cleanly on a SIGTERM or mod_fastcgi isn't waiting around for
the process to end.


Previous Comments:
------------------------------------------------------------------------

[2007-12-18 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2007-12-10 16:15:16] [EMAIL PROTECTED]

I'm not able to reproduce the HTTP 500 response  on graceful restart
with PHP_5_3, mod_fastcgi and Apache.

------------------------------------------------------------------------

[2007-11-19 18:56:25] [EMAIL PROTECTED]

This is still buggy.

------------------------------------------------------------------------

[2007-10-16 20:48:22] andrei dot nigmatulin at gmail dot com

Graceful reload/shutdown implemented in unofficial patch
http://php-fpm.anight.org/. For now docs are in Russian, though.

------------------------------------------------------------------------

[2007-06-13 19:25:56] severn-php at xephris dot net

Re: mod_fcgid: I see... I guess I'll modify mod_fcgid myself for that
setup.

That doesn't explain the mod_fastcgi problems though. I thought it
might be something with my setup so I rebuilt it from scratch... might
have had some old crap left behind. I don't get 500 errors with PHP
5.2.3 + mod_fastcgi 2.4.2 + Apache 1.3.37 anymore, so it does look fixed
in 5.2.3... but I get another strange problem: doing a graceful restart
shortens the sleep time to zero. i.e.

<?php
 $a = time();
 sleep(30);
 echo time()-$a;
?>

Going to this page then doing a graceful after 5 seconds would give "5"
instead of the expected "30".

php5.fcgi==
#!/bin/sh
export PHP_FCGI_CHILDREN=4
exec /opt/php5/bin/php-cgi $*

For the record, PHP 4.4.7 dies with a 500 error, but that's not a big
problem for us...

Could the OP perhaps provide us some info on what versions of Apache
and mod_fastcgi/mod_fcgid so we can try replicating it?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/41593

-- 
Edit this bug report at http://bugs.php.net/?id=41593&edit=1

Reply via email to