On Fri, Jun 23, 2000 at 09:54:49AM -0400, Vivek Khera wrote:
> >>>>> "J" == Justin <[EMAIL PROTECTED]> writes:
>
> J> Its still worth stating for the purposes of getting into the
> J> modperl archive at least, that MaxChildRequests is to be avoided
> J> for modperl backend setups.
>
> I disagree. You just need to have enough back-ends to make sure that
> you don't overwhelm the remaining ones for enough time that it takes
> to fire up a replacement.
>
> And add more RAM. You can never have enough RAM. (and be sure to
> configure your operating system to allow mod_perl to use that
> additional RAM).
>
I totally agree on the RAM - no paging on my box, thats the easiest
way to insanity.. nevertheless, ok let me modify this.. avoid
MaxChildRequests when they are set at a fairly low level, AND traffic
is sufficient to toggle them every 10 minutes or so AND your program
is so large that it takes 10+ seconds for a new child to get going
when the box is under pressure, because you then observe, I think,
a coordinated rush for the exit(0) every 10 minutes.
the goal of producing a stable back-end (not one where apache is
constantly killing and starting big children in response to spikes
in load) produces a stable of httpds that tick down at, on average,
the same rate.
On the questions from the previous post (sorry not to respond quickly)
MaxRequests was 12, MinSpareServers was 2, StartServers was 10.. this
would led to steady state of 12 processes.
I gave up on SizeLimit because I dont want to worry about what limit to
pick.. What I settled on was this : simply increment REQUEST_NO in
each child, and do:
if ($REQUEST_NO++ > 500 && !($REQUEST_NO % 3) && rand()>0.98) {
$r->child_terminate
}
Probably a better way is:
if (($REQUEST_NO++ > (400+$my_slot*100)) {
$r->child_terminate;
}
(MaxRequestsPerChild is set to something huge like 5000)
but I didnt know the variable for slot number and only just thought
of that..
thanks for the help!
-Justin