[mod_python] High traffic recommendations

Mike Looijmans nlv11281 at natlab.research.philips.com
Thu Feb 16 01:36:31 EST 2006


>>>      MaxRequestsPerChild  500
>>
>>Make that 10000 or so. This low a number is only required if your
>>system is leaking lots of resources (which mod_python does not do).
> 
> Now I'm confused. Does it leak or not? How do I test for that?

The MaxRequestsPerChild option instructs Apache to kill any worker process that has processed that 
number of connections ("Request" is a historical name here). Some systems, like Sun Solaris, leak 
memory in their standard libraries and as a result, it is impossible to have a process running too 
long on such a machine, because its memory consumption will keep growing forever.

The mod_python stuff does not leak (a lot), so a low setting just kills workers for no reason.

Note that KeepAlive means that the same connection can be used for multiple requests, and thus the 
number of actual requests handled by a child worker can be much more than the limit supplied here. 
Another good side effect of keepalives is that the client talks to the same worker process, and this 
can improve your caching efficiency - a per process cache is often quite useful.

Mike.



More information about the Mod_python mailing list