[Mono-dev] mod_mono and xsp patches

Marek Habersack grendello at gmail.com
Mon Jan 21 14:03:20 EST 2008


On Mon, 21 Jan 2008 13:45:54 -0500, Joshua Tauberer <jit at occams.info> scribbled:

> Marek Habersack wrote:
> > They're OK to go in, thanks!
> 
> Great, in that case, I'm attaching another patch for mod_mono that 
> implements rate limiting. I had found that under relatively heavy load, 
> mod-mono-server would deadlock. Incoming requests would hang forever, 
> with the result that all of the Apache child processes would get tied up 
> as more requests came in, and so all websites on the server would stop.
> 
> There are only so many worker threads in the XSP thread pool, and at a 
> certain point they're going to get used up. I forget how many threads 
> there are by default, maybe 128, but at a few workers per request, that 
> number gets used up quickly. Obviously the right thing to do would be to 
> make sure mod-mono-server doesn't hang when it runs out of worker 
> threads (if this was even the problem), but barring a fix there, this 
> did the job.
It would be a good thing to make sure that the thread pool exhaustion was
causing the problem, but even without doing it - I think such rate limiting is
a good thing to have.
 
> In my case, I was having problems when the number of concurrent requests 
> went above 20 or 25. (I forget the details. I've been using this patch 
> for around 3-4 months... modulo changes I made today.)
> 
> The patch by default limits the number of concurrent requests passed to 
> mod-mono-server to 20. After that, it holds onto (by default) up to 20 
> more, checking periodically until the initial 20 decreases or a timeout 
> (hard-coded at 10 seconds). The two 20's are configurable with 
> MonoMaxActiveRequests and MonoMaxWaitingRequests.
> 
> This will only work on Apache2 since it relies on the shared memory 
> dashboards.
Great stuff :) - please commit, thanks!

best regards,

marek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080121/1872dbc8/attachment.bin 


More information about the Mono-devel-list mailing list