[ZODB-Dev] memory or cache leak?

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 01 Nov 2001 13:50:01 +0000


On Thu, 1 Nov 2001 04:09:05 -0700, "Andrew Dalke"
<adalke@mindspring.com> wrote:

>[Since I haven't heard any response public or private, and since the
>original subject was wrong, I'm somewhat repeating my previous email
>in the hopes that those in the know find this message more consistent.]
>
>We are running out of memory with our ZODB runs and I can't
>figure out why.  Attached are two scripts, 'make_db.py' and a
>helper library 'Database.py'.  These are scaled down versions
>of our code, and exhibit similar symptoms.
>
>If I run 'make_db.py' the python process grows and grows and
>grows.  When we run the full code, it take up a full GB of
>RAM.  This smaller version will easily take over 260MB of RAM
>(which is how much I gave the process to use).
>
>I can't figure out how to limit the amout of memory used.
>I think there's a problem with the caching, as the number of
>object in the cache never decreases, and cacheSize() (can get
>up to 4,000) goes well beyond the value of getCacheSize()
>(set to 400).

Posting rough numbers makes it harder to give a good diagnosis.

How many objects have you added to the database at this point?
How long does it take?
What is your ZODB configuration (cache size, and time)
How big is an object? (256M/4000=3D65k.... does that sound right?)


Objects can only be moved out of memory after their state has been
saved in the database, If the cache size is 4000ish after adding 4000
objects then I bet you are not committing them.



Toby Dickenson
tdickenson@geminidataloggers.com