[Mono-aspnet-list] Mono Fast CGI on Apache 2.2.8 dies after ~1000 requests
chris.tomlinson at wildscreen.org.uk
Wed Oct 14 15:52:30 EDT 2009
I am having a bit of trouble getting Mono to work reliably with Apache 2.2.8
and Fast CGI on CentOS 5 (with the latest package updates). I have tried
with mod_fcgid 2.2 and 2.3.4 (from SVN) and see no similar problems when PHP
sits at the other end of the mod_fcgid requests.
I have run load tests against the sample ASP.NET websites that were
distributed with Mono 220.127.116.11 and see a consistent failure to get beyond
around 1000 total requests (I can't put my finger on the exact number, maybe
it's 1024). I am not referring to a limit on the concurrent requests but
merely the total which any given mono process handles.
After about 1000 requests, the mono process grabs an entire CPU core and
seems to sit in a busy wait loop. Judging by the output of "lsof | grep
fcgi" I suspect it is waiting for the FCGI unix socket to become available -
the number of handles held open by mono on the FCGI socket sky-rockets until
it reaches about 1000. After the Apache FCGI daemon has determined that mono
has timed out, it kills the mono process, starts a new one and the cycle
repeats. Again, with PHP the number of handles that php-cgi holds open
doesn't grow*. The memory usage also creeps up by a total of a few megabytes
in line with the increasing number of requests that the mono process has
handled but I don't know whether that is related to this problem.
I have found that setting the FcgidMaxRequestsPerProcess mod_fcgid directive
to less than 1000 produces a slight improvement because apache pro-actively
kills the mono process before it reaches this mystery limit but this still
results in the full mono startup procedure being executed every 1000
requests which isn't that great.
I'll really appreciate any ideas on what could be causing this, how I could
work around it more effectively or what further information I could supply
to help us diagnose where the problem lies.
* At least not beyond a handful, I presume heavy concurrent load would push
it up slightly.
View this message in context: http://www.nabble.com/Mono-Fast-CGI-on-Apache-2.2.8-dies-after-%7E1000-requests-tp25897858p25897858.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list