I've been looking through the mod_wsgi website and this group to see
if there are any strategies for dealing with apache processes that
have grown too large (memory leaks) and here is what I believe is the
current state of affairs.

A) Fix the memory leaks (Haven't found the cause yet for us but over
the course of 20K requests to a single machine about 5-10 of our 60
httpd processes will have jumped from using just under 30 megs to over
100 megs. Of course I am still trying to find the issue but in the
meantime need a solution to prevent my machine from swapping like
crazy)
B) Set maximum requests to a small number.  This will reduce the
duration taht a process is around for reducing the number of these
bloated processes that should exist simultaneously.
C) Write a shell/python script to kill the bad processes. This isn't a
bad option but I am wondering what is the best method to kill an httpd
process without affecting our users. E.g. if sent a kill -9 to the
process while it was handling the request, a user would experience an
error. Is there a way to prevent this from happening?
D) Graham has talked about adding some functionality ala perls
SizeLimit to set a maximum RSS size limit for a process.  There seems
to be some issues with this approach and it currently looks like the
project is on hold.

My questions is am I missing something and/or do others have a
preferred approach?

In regards to B or C, I currently prime all my httpd instances after
they have been spawned (using httpperf) to make sure that the python
interpreter, Django and all other modules have been loaded to prevent
latency for the first user to hit that process.  Does anyone know if
there is a way to do that with mod_wsgi when a new process is created
using options B or C?

Yishai


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to