#28065 [Bgs]: resource limits do not work
| From: | floeff at arcor dot de | Date: | Thu, 22 Apr 2004 13:11:54 +0000 |
| Subject: | #28065 [Bgs]: resource limits do not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58571@lists.php.net to get a copy of this message | ||
ID: 28065
User updated by: floeff at arcor dot de
Reported By: floeff at arcor dot de
Status: Bogus
Bug Type: Reproducible crash
Operating System: Linux 2.4.26
PHP Version: 4.3.6
New Comment:
> Don't run PHP as CGI
I need to run PHP as a user, so there only seems to be the CGI method.
Does memory limitation not work for CGI?
Previous Comments:
------------------------------------------------------------------------
[2004-04-22 09:29:21] derick@php.net
1. Don't run Apache 2
2. Don't run PHP as CGI
Do use apache 1.3 with the apache SAPI and this works fine; apache 2 is
NOT ready for production.
------------------------------------------------------------------------
[2004-04-21 21:36:55] floeff at arcor dot de
I checked some more things, here some more results:
- On my test machine, I've set MaxClients in httpd.conf to 20 and I
couldn't kill the machine anymore. This is only a workaround, as it
knocks out a lot of users on higher load machines, but at least it
shows that MaxClients
works for that.
- When a "normal access" (i.e. not my "attack") accesses a PHP script,
the PHP parser is only shown during the run of the script, checked with
ps auxw | grep php. However, when I "attack", it runs for quite a while
several times. It does seem to use the 300 seconds timeout, as I
lowered this to 10
seconds, and the scripts got killed with "(70007)The timeout specified
has expired: ap_content_length_filter: apr_bucket_read() failed".
However, it does not help to lower it, the load rises even more. Had
about 97 (!) some
seconds ago :-( "killall php" or "killall -9 php" doesn't help.
However, shutting down Apache brings down the PHP interpreters, so I
think that Apache just "forgets" about the running instances when it is
flooded and cannot handle them anymore.
Do you have any idea? Do you need more information?
------------------------------------------------------------------------
[2004-04-20 19:05:25] floeff at arcor dot de
If PHP does not terminate after the set amount of time, then for me it
is a bug. Why shouldn't it be one?
------------------------------------------------------------------------
[2004-04-19 23:23:34] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
.
------------------------------------------------------------------------
[2004-04-19 19:49:35] floeff at arcor dot de
Description:
------------
Maybe I misunderstand something, but for me it seems that the resource
limits do not work. In my php.ini, I set
max_execution_time = 10
max_input_time = 10
which - to my understanding - should limit executing time for scripts
to 10 seconds.
I have PHP running as CGI with Apache 2.0.49 on Linux 2.4.26 here, and
with a hughe PHP file involving some diagram creation, I can kill the
machine if I re-load the script for five seconds continuously. It soaks
up all my memory and runs for nearly a minute.
What could be wrong in here? If you need more information, please let
me know. Thanks!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28065&edit=1