The OOM-Killer vs. Python

Chris Liechti cliechti at gmx.net
Sun Mar 24 17:18:37 EST 2002


gerson.kurz at t-online.de (Gerson Kurz) wrote in news:3c9e2b5f.9993062
@news.t-online.de:
> I have a python-based SMTP server (see http://p-nand-
> q.com/shicks.htm)
> running on our server, and in general it has worked flawless (since
> about nov 2001). However, in the recent week that dreaded linux OOM
> killer twice killed the python process. [The machine has 768mb ram 
> call me oldfashioned but that SHOULD be enough for both Linux & 
> Python
> to get along, really. OK, its running KDE, and has only 256mb for
> swap, but still...]

maybe you have some other leaking app and the OOM killer just picks 
the largest.
if you want a reliable server i wouldn't use it as workstation too 
:-)

> Anyway, even though I believe that this is more of a fault of the
> Linux Kernel VM quality than the script (the system has been 
> running
> fine for months and now two kills in one week - that smells fishy 

you can put the server in inetd.conf or initab so its atleast 
restarted after the kill (to limit downtime...)

> to me) - how CAN I controll the memory usage for pythons GC? Is 
> there a way to easily find out in python which memory is allocated 
> at runtime, and by which objects?

don't know. you could periodicaly save "top" outputs and see which 
process grows.

chris


-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list