[mod_python] Apache processes "eating up" too much memory (leak?)

Graham Dumpleton grahamd at dscpl.com.au
Thu Dec 15 18:07:00 EST 2005


FWIW, you might consider upgrading to mod_python 3.2.5b if you can. I
believe that that version eliminates a few memory leaks in certain
circumstances in mod_python itself, although I don't remember the
details. This may or may not be contributing. My understanding was that
the mod_python leaks weren't that great, but if you are handling a lot
of requests it may be noticeable. You also may want to configure Apache
to recycle child processes after a certain number of requests to avoid
overblown processes.

Sorry, I know this doesn't really help with tracking down the source of
any problem if in your code. :-)

Graham

=?ISO-8859-1?Q?S=E9bastien_Arnaud?= wrote ..
> Hello!
> 
> I am running mod_python on 2 identical production server for 2 small  
> apps I wrote which basically render over 100 of different SVG charts. 
> I am running Gentoo on those servers, mod_python 3.1.4, apache 2.0.55 
> in prefork mode, each server has 1 Go of mem.
> 
> Both applications have been in beta testing for like 1 month or so,  
> and I just noticed today that the memory usage was really high for  
> each apache process running (max of 10 set in the conf file). When I  
> started those apache process 30 days ago they stabilize at 2.0 % of  
> memory used, but somehow after 30 days of users testing the app, it  
> went to 10% per apache process, which made the swap usage go to 1Go  
> (over 2Go avail). I am doing quite a lot of caching of XSL files in  
> the app, but this is suppose to happen at launch time, meaning I  
> instantiate all the objects I need at the first call of the  
> mod_python handler and they persist through the life of those apache  
> processes. Does somebody know anyway to inspect each apache process  
> to see where the memory is being used? Basically I am trying here to  
> figure out if I have some kind of memory leak going on, or if there  
> is something I miscalculated when caching the large amount of XSL  
> files in persistent Python objects.
> 
> Apart from that, those 2 little applications fly in terms of speed! A 
> lot of people (including me) got really blown away to witness the  
> speed of those 2 apps on those "old" servers (which are quad PIII  
> 550Mhz btw).
> 
> Thank you in advance for any insights so that I can get to the bottom 
> of this!
> 
> Cheers!
> 
> Sébastien Arnaud
> eMedia Library, inc
> sebastien at emedialibrary.org
> 
> 
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python


More information about the Mod_python mailing list