[Zope] Zope 2.7.3 Memory Leaks

Andy Yates andy at nnu.com
Fri Jan 7 11:49:12 EST 2005


> > ...
> > For example if I have ab make X requests, X new sessions are created
and
> > memory use goes up by 100MB.  I also see about X objects in the
> > transient object container.  Now I wait for the sessions to expire
based
> > on the "Data object timeout value".  Then I make a few calls to
tickle
> > the Transient system's garbage collection.  The objects in the toc
goes
> > down but memory use does not.  Some have posted that python does not
> > release memory it just reuses it.  Well, when I make X more requests
the
> > memory is not reused.  Now it is using 200MB.
> 
> I know as much about the gory details of Python's memory-management as
> anyone on Earth, so you can believe this:  if anyone gives you a
> catchy one-line summary, don't believe them.

Let's not go into the gory details.  Another discussion of the
complexities of memory management will not be productive.  The fact
remains that if given enough time Zope will use so much memory that it
crashes the server.  I've reproduced this on at least 3 Linux servers
with a clean install of Zope.  The pattern SEEMS to be the more data I
put in a session object the faster the server dies.  This can not be
normal behavior.  I'm used to servers running for months.  I have to
restart Zope every 3 days at least.  I need to at least have a long
weekend away form this thing!  ;-)

Can anybody please verify my results.  I've given a very simple test
case.  If I'm only one in the world that can cause this to happen then
fine.  At least that narrows my search to something internal to our
system.  
 
> No.  The BTree code is really part of ZODB, and has been there (as far
> as I know) forever; Jeremy Hylton and I did a lot concentrated work to
> squash memory leaks in ZODB (including its BTree code) a couple years
> ago.  The BTree code has been very stable (== has been changed very
> little) since then.

Please don't take offence I'm sure the BTree code is really cool.  I'm
just grasping at straws.  When this problem started I was told the
problem must be in MY code.  So I removed ALL my code and made a very
simple test case that reproduces the problem.  Then I was told well you
just don't understand how memory REALLY works.  At this point I don't
really care how memory really works.  I just want to be able to put data
in session objects without my server crashing.

Run my test case and see what happens.  I double dog dare you!  ;-)

Andy


More information about the Zope mailing list