[Chicago] Out of Memory: Killed Process: on CentOS

Garrett Smith g at rrett.us.com
Mon Apr 27 19:23:19 CEST 2009

----- "Brian Ray" <bray at sent.com> wrote:

>>> What is the best ways to manage this scenario?  Specifically, what
>>> should I try?
>> I suggest first confirming that it's memory. Get the server into the
>> non responsive state and use 'top' to survey the problematic  
>> processes.
> I see from the "var/log/messages" it is killing httpd when it can.


Homework: how much resident memory is being consumed before the process
is killed? It's got to be a number :)

If it is actually memory, the rest I think will be easy. Look for the
code that loads the content from the http request. Replace the actual
content with fake data that's very small and see if the problem goes

Then figure out how to parse and handle that payload more efficiently.
Dave's suggestion sounds perfect, if indeed that's your problem.

As far as leaks, confirm it first. Watch resident RAM (see homework
above) over many requests. If it grows and grows, you've got a leak.

I haven't used profiling tools to track down leaks in Python -- I
generally use an approach of "where's a likely source" and start
commenting things out and retest. Not the highest tech approach, but it
generally works. I'm open to a better way though, if anyone has
suggestions :)

More information about the Chicago mailing list