#43224 [Asn->Fbk]: support real graceful reload of fastcgi
ID: 43224
Updated by: dmitry@php.net
Reported By: glen at delfi dot ee
-Status: Assigned
+Status: Feedback
Bug Type: Feature/Change Request
Operating System: PLD Linux
PHP Version: 5.2.5RC2
Assigned To: dmitry
New Comment:
FastCGI PHP SAPI supports only gracefull restart initiated by SIGTERM
and SIGUSR1, however you still able to terminate worker processes with
sending SIGINT/SIGQUIT to process group.
I'm not going to change it as it may break behavior with some FastCGI
managers.
Previous Comments:
------------------------------------------------------------------------
[2008-06-11 11:18:40] glen at delfi dot ee
hi
any progress with the patch?
i can confirm that it works without problems since i initially
created the patch.
------------------------------------------------------------------------
[2007-11-09 11:42:42] glen at delfi dot ee
Description:
------------
currently (checked 5.3 and 5.2) php-fcgi when receiving terminating
signal, finishes the request, ie does not terminate immedately.
however it does not close the socket it is listening for incoming
connections.
and there's no way to make the process really terminate in a nice
way. ie if you really want to terminate fcgi backend processes while
not caring whether the request is finished or not you can do this
only by sending SIGKILL, but it might be too brutal :)
for the first problem i've created patch for unix (linux) platform,
few testing shows that it really works.
for the second problem i'd suggest to use SIGINT for graceful
restart (close listening socket, end when php processing finishes)
and SIGTERM would just close listening socket and abort php
processing by making the child exit itself.
patch for 5.2.4 (also 5.2.5RC2):
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-fcgi-graceful.patch?only_with_tag=MAIN
patch for 5.3-snap:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/php-fcgi-graceful.patch?only_with_tag=DEVEL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43224&edit=1
Thread (8 messages)