[Zope] Zope Memory Problem

Dieter Maurer dieter at handshake.de
Wed Oct 29 15:32:20 EST 2003


Douwe Osinga wrote at 2003-10-29 10:52 +0100:
 > I am experiencing problems with the amount of memory Zope is using.
 > I'm using Zope 2.6.2 and Windows 2000 server. Now, things work fine
 > for days and then suddenly something goes wrong and the amount of
 > memory in use by Zope increases until 2Gb or so and the process
 > stops responding completely.
 > 
 > My current theory is that this happens when some requests take very
 > long to answer (ie. 1 minute or so).

This may be so but only as a side effect:

  Something that takes long can grab lots of memory....

Otherwise, there is no strict connection between long running
requests and high memory usage.

I see 3 potential causes (there may be more):

  *  you have a piece of broken code that consumes memory in an
     infinite loop.

     You could use the "-M" option of "z2.py" to log all requests
     and find out the requests that bring your Zope down.
     From these requests, you could dig deeper to locate the broken
     code.

  *  you have memory leaks -- pieces of code that leak (usually)
     small amounts of memory. Over time, you loose more and more
     memory.

     You can use Shane's "LeakFinder" product to track this down.

  *  you really need that much memory

     This may be the case, e.g., for large "ZCatalog" updates
     or mass imports. In some cases, you can use "subtransaction"s
     to reduce the memory burden.

     I do not expect that you have this case.


-- 
Dieter



More information about the Zope mailing list