On Tue, 2006-12-12 at 13:32 +0200, Janno Sannik wrote:
> My idea what happened:
> All children (10) were working on requests.
> As new reqs came on all children were busy serving previous reqs thus 
> multiplexer couldn't forward a new connection to child. And then it ran 
> out of multiplexers (10) and whole server came to a standstill.
> 
> Is my theory correct?

Yep, that's what I've seen too :(

> Couln't it be possible to somehow work around that problem (giving some 
> kind of 503 error after some timeout  or spawn a new multiplexor, to 
> save the situation)

I think the spawning code needs to be reworked entirely... it seems to
ramp up to MaxProcessors rather quickly even if that vhost isn't getting
a ton of traffic (even with MinSpareServers set to 1, which makes it
pretty much useless - why even set it higher?)

Maybe if new processes were spawned only when they're *really* needed,
we could go without a MaxProcessors limit, or be able to set it to 100
or something, just to keep the machine from running out of memory and
crashing.  When the traffic goes away, the IdleTimeout should bring
things back down to normal.

Another thing that would help is dynamic multiplexer spawning -
basically treat them like a group of Processors.

> Yeah i know, that those who could add this feature may be too busy with 
> theyr real life to take a look at it since it seems like a considerable 
> work, but maybe at least it could end up in faq or todo list.

Yeah, you nailed it ;)  I tried making some major changes to the code
this summer, but I hit a few roadblocks and then real life intervened,
as it always does.  I'm in the middle of upgrading the OS on my web
server and development box, but once I'm finished with that I'm going to
try to make some modest, incremental updates to peruser (and maybe
target apache 2.2).

> Right now simple fixup for this would be to add (a lot) more multiplexors?

Probably... I just raised the MaxProcessors limit for the vhost under
load, last time this happened to me.  I didn't think to add more
multiplexers.

I also discovered a nasty bug this weekend - if you have a vhost
configured (with the chroot option) and the chroot doesn't exist, when a
request comes in for that host it causes very strange problems.
Fortunately that one will be easy to test and hopefully easy to fix (or
at least, fail gracefully).

-- 
Sean Gabriel Heacock
Telana Internet Services
http://www.telana.com/

_______________________________________________
Peruser mailing list
[email protected]
http://www.telana.com/mailman/listinfo/peruser

Reply via email to