I recently tracked down an issue in one of our Django apps where we
were foolishly returning way too much data from the DB to the view.
In some cases, the python view code was allocating over 100 MB of
data.  The overall symptoms experienced on the server seemed a bit
odd, hence my message.

We're running the prefork mpm on Ubuntu 8.04, apache and mod wsgi
installed via apt.  When our django view queried all this data, we saw
the apache child's memory usage spike as you might expect.  What seems
odd though is the memory never seemed to be released.  When that child
handled another request processed by the bad code, even more memory
would get allocated.  This seems odd since the code in question is all
completely local to the view function.  It's not doing anything crazy
like setting module level variables or anything else that would be
persisted after the view returned.

The end result was that after a number of these requests were
processed, the entire server would go into panic.  All other services
would be unresponsive, including sshd.  The only way to regain access
was to power cycle the box.  It seems to me that some piece in the
stack should play nicer with the OS when an out of memory situation
comes up.  I'd much rather see apache (or modwsgi) segfault and still
have access to my server than the opposite.

Is there something already built into apache and/or modwsgi to play
nicer with the OS that I'm missing?  If not, should there be?

Thanks for your time,
-andy
--~--~---------~--~----~------------~-------~--~----~
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