[Bug 162082] Re: PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed

Jakob Unterwurzacher jakobunt at gmail.com
Sun May 11 22:28:33 BST 2008


** Description changed:

- Binary package hint: php5-cgi
+ This Bug is already reported here: http://bugs.php.net/bug.php?id=40286
+ and here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431799 (inactive)
  
- This Bug is already reported here: http://bugs.php.net/bug.php?id=40286
- and here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431799
+ I see it in Ubuntu Hardy now:
+ PHP 5.2.4-2ubuntu5 with Suhosin-Patch 0.9.6.2 (cgi-fcgi)
  
- I see it in Ubuntu Dapper
- $ php-cgi --version
- PHP 5.1.2 (cgi-fcgi) (built: Jul 17 2007 17:21:59)
- 
- Quoting from: http://bugs.php.net/bug.php?id=40286 
- ----------------
- Context:
+ Quoting from: http://bugs.php.net/bug.php?id=40286 :
  When running PHP in FastCGI mode with a fastCGI apache module (such a
  mod_fcgid), all is running fine when PHP_FCGI_CHILDREN unset : only 1
  process spawned. When using PHP_FCGI_CHILDREN=n, the PHP parent process
  forks n childs, and the parent acts as a manager between the child
  processes, wait()ing to respawn them if they are killed or exit. The
  problem happens when the FastCGI process manager handled by the apache
  module has to kill the parent PHP process (it only knows the parent's
  PID) for any reason such as idle timeout, max lifetime, etc.
  
  Problem:
  While the PHP parent process is properly killed by the FastCGI process
  manager, the children aren't killed, but instead stay alive, waiting for
- a new request which will never come (because the socket shared with the
- parent is removed at the same time parent is killed).
- ----------------
+ a new request which will never come.
+ This sooner or later uses up all availible RAM and lead to a DOS.
+ 
+ Workaround: See comments.

-- 
PHP fastcgi with PHP_FCGI_CHILDREN doesn't kill children when parent is killed
https://bugs.launchpad.net/bugs/162082
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in ubuntu.



More information about the Ubuntu-server-bugs mailing list