[mod_python] extreme memory usage with apache2

Jim Gallacher jg.lists at sympatico.ca
Wed Sep 14 11:50:52 EDT 2005


Nicolas Lehuen wrote:
> Thanks Jim, my mother tongue is French and I sometimes have problems 
> with English colloquial expressions :).

Actually, your English is excellent. In fact at times I think it's 
probably better than mine. :) As far as colloquial expressions are 
concerned, well, English is just such a goofy language in so many ways 
anyway, isn't it?

Regards
Jim

> Regards,
> Nicolas
> 
> 2005/9/14, Jim Gallacher <jg.lists at sympatico.ca 
> <mailto:jg.lists at sympatico.ca>>:
> 
>     Nicolas Lehuen wrote:
>      > "Real soon now" :).
>      >
>      > Seriously, we're never been that close.
> 
>     I don't mean to jump on Nicolas' english or anything... ;) but what he
>     means is "we've never been *so* close". The phrase "never been *that*
>     close" might suggest that the next version of mod_python may never be
>     released.
> 
>     3.2 is imminent.
> 
>     Regards
>     Jim
> 
> 
>      > Regards,
>      > Nicolas
>      >
>      > 2005/9/14, Sebastjan Trepca < trepca at gmail.com
>     <mailto:trepca at gmail.com> <mailto:trepca at gmail.com
>     <mailto: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
>     <mailto:nicolas.lehuen at gmail.com>
>      >     <mailto:nicolas.lehuen at gmail.com
>     <mailto: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
>      >     < http://issues.apache.org/jira/browse/MODPYTHON-1>
>      >      >
>      >      >  Regards,
>      >      >  Nicolas
>      >      >
>      >      > 2005/9/13, mauchi < mauchi_co at earthlink.net
>     <mailto:mauchi_co at earthlink.net>
>      >     <mailto:mauchi_co at earthlink.net
>     <mailto: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
>     <mailto:Mod_python at modpython.org> <mailto: Mod_python at modpython.org
>     <mailto:Mod_python at modpython.org>>
>      >      > > http://mailman.modpython.org/mailman/listinfo/mod_python
>     <http://mailman.modpython.org/mailman/listinfo/mod_python>
>      >     <http://mailman.modpython.org/mailman/listinfo/mod_python>
>      >      > >
>      >      > >
>      >      > >
>      >      >
>      >      >
>      >      > _______________________________________________
>      >      > Mod_python mailing list
>      >      > Mod_python at modpython.org <mailto:Mod_python at modpython.org>
>     <mailto:Mod_python at modpython.org <mailto:Mod_python at modpython.org>>
>      >      > http://mailman.modpython.org/mailman/listinfo/mod_python
>     <http://mailman.modpython.org/mailman/listinfo/mod_python>
>      >      >
>      >      >
>      >      >
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Mod_python mailing list
>      > Mod_python at modpython.org <mailto:Mod_python at modpython.org>
>      > http://mailman.modpython.org/mailman/listinfo/mod_python
>     <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



More information about the Mod_python mailing list