[mod_python] severe memory leak problem with mod_python

Manjeet Chaudhary manjeet at infogridpacific.com
Thu Jul 7 06:53:31 EDT 2005


Hi Nicolas

> Could you be affected by this bug ?
> http://issues.apache.org/jira/browse/MODPYTHON-1

We are not using any cyclic reference...

> It is fixed in the current development version but still present in 
> the 3.1.4 version.

Presently i am using patched version of mod_python-3.1.4. Two patches i 
used are : http://www.dscpl.com.au/projects/vampire/patches.html
I found a new releases of mod_python after "ver 3.1.4"; 
"mod_python-3.2.0-experimental-release" and the "Current Development 
Version" on mod_python's subversion. Which one i should install.

> Another possible memory leak (which is not confirmed yet) is the 
> PythonOption configuration directive :
> http://issues.apache.org/jira/browse/MODPYTHON-60
> But apparently you are not using it.

Yes we are not using  PythonOption directive.
I will retry using newer version of mod_python. Any other solution

Thank you
Manjeet Chaudhary

>
> Regards,
> Nicolas
>
> 2005/7/7, Manjeet Chaudhary <manjeet at infogridpacific.com 
> <mailto:manjeet at infogridpacific.com>>:
>
>     Hi Guys
>
>     We are facing memory leak problem; most probably due to mod_python.
>     Our application is web-based application using below mentioned Apache
>     server version including mod-python. We are using Publisher
>     Handler in
>     mod-python.
>     We are facing a severe memory leak problem [ memory is used and never
>     being freed , it is freed only when we stop apache server (httpd) or
>     restart it]. We are using dbxml(2.1.8) as our backend database. Our
>     program (python module) in cgi-bin dir is processing the url request.
>     The module is accessing the document from the dbxml container through
>     Simple - XML -RPC communication and returning to the browser. As
>     the no.
>     of requests increases memory is used up [never freed again] and the
>     server crashes [CentOS automatically kill the process], but if we stop
>     or restart httpd the memory is released in huge amount . There were
>     similar problems in dbxml version 2.0.9 , but those were solved
>     when we
>     upgraded it to version 2.1.8.
>
>     I have already updated my kernel, mod_python, dbxml.
>     I used Valgrind to check memory leak. But in summary report it is not
>     showing any type of memory leak.
>
>     I also read that is there is some problem with Python and it's memory
>     management. ( http://evanjones.ca/python-memory.html ). Is this a
>     problem due to Python's memory management. But our other
>     application/servers are working fine.
>
>     It seems that apache/mod_python process is leaking memory.
>     This is a serious problem and so we need a solution for it.
>
>     Please help me out for solving this problem.
>     Maybe somebody here has any idea what is going on.
>
>     Thank you in advance and all the best,
>     Manjeet Chaudhary
>
>     Summary:
>     -----------------------------------------------------------
>     .................
>     Hardware/Softwares and OS we are using :-
>     Pentium4 machine with 1GB DDR-RAM.
>     CentOS 4.0 - kernel 2.6.9-11-EL. Upgraded from 2.6.9-3
>     Dbxml - 2.1.8 upgraded from 2.0.9
>     Mod_Python - 3.1.4 with Patches
>     Python - 2.3.4.
>     HTTPD server - Apache/2.0.52
>     Pybsdbd - bsddb3-4.3.3
>     .................
>     Httpd Configurations: (mod_python specific. We are using .htaccess in
>     cgi-bin directory )
>
>     <Directory "/var/www/cgi-bin">
>     AllowOverride FileInfo
>     Options FollowSymLinks
>     Order allow,deny
>     Allow from all
>     </Directory>
>     .................
>     .htaccess file:
>
>     AddHandler mod_python .py
>     SetHandler mod_python
>     PythonHandler mod_python.publisher
>     PythonDebug On
>     .................
>     Remedies i applied:
>     1. Updated Kernel from 2.6.9-3 to 2.6.9-11.EL as suggested in
>     http://lists.centos.org/pipermail/centos/2005-June/007113.html
>     <http://lists.centos.org/pipermail/centos/2005-June/007113.html>
>     2. Updated DbXml from 2.0.9 to 2.1.8 as suggested in
>     http://www.sleepycat.com/xml_update/2.1.8/if.2.1.8.html
>     3. Reinstalled mod_python with patches as mentioned in
>     http://www.dscpl.com.au/projects/vampire/patches.html
>     _______________________________________________
>     Mod_python mailing list
>     Mod_python at modpython.org <mailto:Mod_python at modpython.org>
>     http://mailman.modpython.org/mailman/listinfo/mod_python
>
>


More information about the Mod_python mailing list