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

Sébastien Arnaud arnaudsj at emedialibrary.org
Thu Dec 15 17:54:52 EST 2005


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






More information about the Mod_python mailing list