php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28556 PHP as CGI becomes a zombie when loaded too often
Submitted: 2004-05-28 14:37 UTC Modified: 2005-03-03 22:26 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: floeff at arcor dot de Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.6 OS: Linux 2.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: floeff at arcor dot de
New email:
PHP Version: OS:

 

 [2004-05-28 14:37 UTC] floeff at arcor dot de
Description:
------------
Sorry for posting this again and again, but I still experience this problem and there seems to be no way for me to solve it. I've got confirmation from others that this problem is not only mine, so please take the time to read this.

I've tried Apache 1.3 and 2.0, both on Linux 2.4. I've tried using suEXEC and not using suEXEC, and I even tried modules that stop script execution at a specific load average (tested with 1.00!) or number of processes (tested with 10!). But nothing seems to help in the following case:

I run PHP as CGI because I don't want to have world-readable scripts and mod_perchild is not ready yet. When I do a hard reload - i.e. reloading the same script for about 10 seconds continously which should open quite a lot of scripts - I can crash the server. PHP-CGI-processes become zombies, I get a load average of about 90 (!) and it can take up to 30 minutes until the system responds again. This happens even with the simplest PHP scripts like a phpinfo call, but Perl scripts make absolutely no problem.

The PHP developers say it's an Apache problem, the Apache developers say it's a PHP problem. So *PLEASE* take the time to review this one again - I'm helpless right now! :-( I know there must be a solution, because some providers run PHP as CGI without problems, but I don't know what it could be. :-(


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-08 13:02 UTC] sniper@php.net
Have you tried on another machine?
 [2004-07-08 17:58 UTC] floeff at arcor dot de
I have tried on a lot of machines.
 [2004-12-13 09:18 UTC] floeff at arcor dot de
Sorry, seems I forgot to update this bug report.
The problem disappears as soon as I do *NOT* compile with --with-libmm

So it seem to be a libmm bug?
 [2005-02-03 04:04 UTC] sniper@php.net
What --with-libmm do you mean? There is no such configure option in PHP..

 [2005-02-03 08:46 UTC] floeff at arcor dot de
Or was it --with-mm?
 [2005-02-03 19:25 UTC] sniper@php.net
And it still happens with latest CVS snapshot?
 [2005-02-03 21:05 UTC] floeff at arcor dot de
Unfortunately, I have no test system to try.
If you want, I can mail you my documentation privately (via PM), so you can check it out.
 [2005-02-05 03:40 UTC] sniper@php.net
DO NOT email anything to me!! Put any details needed to reproduce this bug here, via this url:

http://bugs.php.net/bug.php?id=28556&edit=2


 [2005-02-05 19:07 UTC] floeff at arcor dot de
I don't post my (maybe security-related) configuration to the public, sorry. Any e-mail address I could mail it to?
 [2005-02-06 06:57 UTC] sniper@php.net
Come up with configuration that isn't "security threat" to you and put it here..

 [2005-02-06 14:27 UTC] floeff at arcor dot de
Okay, here we go:

./configure --enable-safe-mode --with-mysql --enable-discard-path --with-exec-dir --enable-memory-limit --with-mm && make && make install

cp php.ini-dist /usr/local/lib/php.ini

echo ':PHP:E::php::/usr/local/bin/php:' > /proc/sys/fs/binfmt_misc/register
echo ':PHP3:E::php3::/usr/local/bin/php:' > /proc/sys/fs/binfmt_misc/register
echo ':PHP4:E::php4::/usr/local/bin/php:' > /proc/sys/fs/binfmt_misc/register

Changes in php.ini:
expose_php = Off
disable_functions = phpinfo
allow_url_fopen = Off

In httpd.conf of Apache2:

AddHandler cgi-script .cgi .pl .php .php3 .php4
 [2005-03-01 01:59 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And please try without using this binfmt_misc module to rule out THAT possible cause of this bug.



 [2005-03-01 19:23 UTC] floeff at arcor dot de
I already tried without binfmt_misc, same problem. Regarding the snapshot: Unfortunately, I have no testing machine at the moment, and after removing that mm stuff, it works fine. I will get back to you if I have a testing machine again someday, but feel free to test it out yourself and ask whatever question you have.
 [2005-03-02 23:21 UTC] sniper@php.net
What libmm version do you have installed?
(I can't reproduce this with latest stable CVS and libmm-1.3.1)


 [2005-03-02 23:27 UTC] floeff at arcor dot de
It was the Debian 3.0 package, version 1.1.3-6.3
 [2005-03-03 22:26 UTC] sniper@php.net
Reopen if you can reproduce this with:

a) the latest STABLE cvs snapshot of PHP
b) the latest MM library

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 07:01:32 2024 UTC