[Mono-list] Some issues with mono 2.0

Joshua Tauberer jit at occams.info
Mon Sep 22 17:02:11 EDT 2008


Maxim wrote:
> 1) In rush hours mod_mono server didn't close the connections, and
> hundreds or even thousands open connections "kill" the server. In
> error_log there are only messages like "[warn] child process 12467 still
> did not exit, sending a SIGTERM". It happens in random manner several
> times per day in rush hours. Just number of open connections starts grow
> exponentially.

Have you tried adding something to httpd.conf like:

     MonoMaxActiveRequests 10
     MonoMaxWaitingRequests 30

Or setting the environment variable MONO_THREADS_PER_CPU to something 
greater than the default of 5?

I've found what you describe to seem to have to do with Mono 
deadlocking. Though I'm not sure. In any case, that's why I set 
MonoMaxActiveRequests fairly low at 10.

> 2) May be related to 1) - mod_mono processes grow in time (I mean memory
> consumption). And sometimes reached 1-2 Gb for most loaded web-sites.

Similarly:

     MonoAutoRestartMode Requests
     MonoAutoRestartRequests 10000

to prevent the growth from getting to be too much before restarting the 
backend.

Interestingly I used to have that problem, but lately something about 
either having a faster server or setting the directives above have kept 
the memory around 400MB or less, iirc.

Josh


More information about the Mono-list mailing list