From:             glen at delfi dot ee
Operating system: PLD Linux
PHP version:      5.2.5RC2
PHP Bug Type:     CGI related
Bug description:  support real graceful reload of fastcgi

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 bug report at http://bugs.php.net/?id=43224&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43224&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43224&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43224&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43224&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43224&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43224&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43224&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43224&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43224&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43224&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43224&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43224&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43224&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43224&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43224&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43224&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43224&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43224&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43224&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43224&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43224&r=mysqlcfg

Reply via email to