httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Carrette <>
Subject Re: Making RLimitMEM and RLimitCPU work for httpd children
Date Mon, 30 Jun 1997 12:20:10 GMT
dgaudet @ (Dean Gaudet) said:
>06/28/97 01:17:29 PM
> your example makes it seem like the Rlimit
>applies only to things in /cgi-bin.  But I'm guessing the code imposes
>these limits process wide all the time, so it's slightly misleading.
>In order to integrate something like this into the server as a feature
>we'd need a directive that says "apply resource limits to httpd child
>in addition to cgis".  

It is confusing because I was trying to get out of having to come up
with that new directive, call it RLimitApply. Perhaps the default
would be RLimitApply exec, to describe current behavior.

Note that I was originally confused by the documentation for RLimitMEM
because I thought that it did imply that it would cause limits to all httpd 

Anyway, here is how I thought I got out of having to come up with a new,
possibly even more confusing directive: By making the behavior of RLimitMEM
depend on the *context* of the configuration. If in a server-wide context
it would apply to the whole server, all the children,
but if in a directory specific contect it would apply to only exec'd children.

But, maybe I'm confused too much by all the configuration management code
to know what is really going on!

In child_main I'm doing this:


But in call_exec it is this:


If a system manager doesn't want RLimitMEM to apply to the entire server
he can keep it out of the "global" configuration.

>And it'd be nice if it could use getrusage() to
>setrlimit() appropriate soft values on a per-request basis (and then
>remove the limits at the end of the request).  That would be a cool
>feature to have.

Indeed. Much easier for a person to configure safely. But I'm pretty shy of
calling getrusage on some unix os versions and also shy on making multiple
calls to setrlimit. Having had enough bad experiences, in the past of course,
to not want to push my luck on all platforms. 

>P.S. We need context diffs (diff -c3) to apply things against HEAD.


View raw message