[mod_python] extreme memory usage with apache2

Nicolas Lehuen nicolas.lehuen at gmail.com
Wed Sep 14 04:22:28 EDT 2005


"Real soon now" :).

Seriously, we're never been that close.

Regards,
Nicolas

2005/9/14, Sebastjan Trepca <trepca at gmail.com>:
> 
> And when do you expect mod_python 3.2.0 will be released?
> 
> Regards, Sebastjan
> 
> On 14/09/05, Nicolas Lehuen <nicolas.lehuen at gmail.com> wrote:
> > There is a possibility that you've ran into a known memory leak that is
> > fixed is the 3.2 beta version of mod_python, but still present in the 
> 3.1.4
> > version. If your webObject instance stores something into the req object
> > which points back to the webObject instance, bam, you've created a 
> reference
> > cycle which won't be garbage collected in 3.1.4 (but will be in 3.2).
> >
> > Here is the issue in our bug tracking system :
> >
> > http://issues.apache.org/jira/browse/MODPYTHON-1
> >
> > Regards,
> > Nicolas
> >
> > 2005/9/13, mauchi <mauchi_co at earthlink.net>:
> > >
> > > I've noticed this behaviour as of late which causes large memory usage 
> in
> > apache2, rogue threads taking up 400+ megs for each client that 
> eventually
> > cause me to restart apache:
> > >
> > > I return all html content through a python object which handles the 
> form
> > data and tracks errors
> > >
> > > # Init object and parse form
> > > response = webObject(req)
> > >
> > > # return html or xml based on form entries
> > > req.write(response.returnSomething())
> > >
> > > # print debugging information
> > > req.write(response.returnErrors())
> > >
> > > the object has an internal array called errors where I store debugging
> > information from the internal functions. What I expect is 1-2 lines of
> > messages for each time the page is loaded which is printed at the bottom 
> of
> > the page. What I find is if I keep hitting refresh, that the lines grow 
> each
> > time with the previous load's messages. 50 refreshes later I'll have 
> 50-100
> > lines of debugging information. This makes me think that the webObject 
> is
> > staying in memory between loads and doesn't get destroyed until I 
> restart
> > apache2. This has become more of a problem as each client page now 
> requests
> > frequent xml updates and the server quickly tires out.
> > > If anyone has a suggestion on how to either: turn off said behaviour 
> in
> > mod_python, destroy objects from memory, or a clever way to flush out 
> all of
> > an object's internal data between loads, I would be most happy.
> > >
> > > Thanks to all in advance!
> > >
> > > Mauchi
> > > _______________________________________________
> > > Mod_python mailing list
> > > Mod_python at modpython.org
> > > http://mailman.modpython.org/mailman/listinfo/mod_python
> > >
> > >
> > >
> >
> >
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050914/d78b76fe/attachment.html


More information about the Mod_python mailing list