Bug#423002: apache: The RLimitCPU directive doesn't act
On Wed, 2007-05-09 at 13:01 +0200, Stefan Fritsch wrote:
> > Using the RLimitCPU directive doesn't change anything in Apache behaviour
> > : it doesn't limit execution time.
> > I used RLimitCPU 30 in the config of a virtual server in order to limit
> > execution time to 30 seconds, but it didn't seem to work, so I added :
> > php_admin_value max_execution_time 60 to the virtual server config then,
> > running a very long php page I got :
> >> PHP Fatal error: Maximum execution time of 60 seconds exceeded
> > It shows that the script ran until the php time limit, without considering
> > at all the RLimitCPU directive.
>
> If you use mod_php this is the intended behaviour. From
>
> http://httpd.apache.org/docs/1.3/mod/core.html#rlimitcpu
>
> "This applies to processes forked off from Apache children servicing
> requests, not the Apache children themselves."
>
> So this will affect php only if you use it in cgi mode, not if the php
> scripts run in apache with mod_php.
Note also: there is a difference between CPU time and execution time ...
running for 60 seconds most likely _doesn't_ mean hogging the CPU for 60
seconds.
Cheers, Rald Mattes
> Cheers,
> Stefan
>
>
>
>
Reply to: