[Zope] Re: Anybody running Zope on Alpha? [was: Python/Zope + Alpha/Redhat == Memory Bloat?]

Shane Hathaway shane@zope.com
Thu, 31 Jan 2002 14:19:22 -0500


Stefan H. Holek wrote:

> At 31.01.2002 13:01 -0500, Shane Hathaway wrote:
> 
>> Stefan H. Holek wrote:
>>
>>> I am observing the following phenomenon:
>>> Develop a Zope site on Intel/Redhat. Takes about 40MB RAM.
>>> Deploy the site on Alpha/Redhat. Contantly grows, easily eating 1GB 
>>> (!) of RAM until it hits the swap and we restart Zope!
>>
>>
>>
>> I assume you've removed extra products and you're running an "out of 
>> the box" Zope.
>>
>> The first thing I would look at is the "debugging" control panel.  It 
>> will tell you if there are a lot of instances of specific Python 
>> classes.  If there are, it could be a Zope bug.  If there aren't, it's 
>> probably a Python (or C runtime or C compiler or kernel or hardware 
>> ;-) ) bug.
>>
>> Shane
> 
> 
> How does for example
>   RestrictedPython.compiler.transfomer.Transformer: 774635
> look to you? ;-)


Very excessive!

The compiler package (contained in RestrictedPython, but as of Python 
2.2 it's in the Python standard library) uses a lot of circular 
references.  If circular GC isn't working then every time you use a 
Python script, Page template expression, or a DTML expression, memory 
bloat will follow.

I wonder if you should approach this by fixing Python's circular GC or 
by fixing the circular references in the compiler package.  Since there 
could be other circular references, the first option seems better.

Shane