[Zope3-Users] MemoryError Evolving a ZODB

Jeroen Michiel jmichiel at yahoo.com
Wed Dec 12 08:39:18 UTC 2012


Thanks for the reply!

I already tried
transaction.savepoint()
every minute, but that didn't help: I only saw the memory usage dropping the
first time, but never after.

I changed the code to what you suggested, but it still doesn't seem to help.
Something must be wrong somewhere along the line, but I don't have a clue
where to begin looking.
Would using something like guppy (or heapy, or what it's called) reveal
something?

Could it be something about objects with circular references not being able
to be garbage-collected?
The objects in my DB are quite complex, so something like that might
actually be happening.


Adam Groszer-3 wrote:
> 
> Well it loads too many objects in a single transaction.
> Doing this after some iterations (10k?, depends on your object sizes) 
> helps usually:
> 
> def forceSavepoint(anyPersistentObject=None):
>      transaction.savepoint(optimistic=True)
> 
>      if anyPersistentObject is not None:
>          #and clear picklecache
>          conn = anyPersistentObject._p_jar
>          conn.cacheGC()
> 
> 
> -- 
> Best regards,
>   Adam GROSZER
> --
> Quote of the day:
> A liberal is someone too poor to be a capitalist and too rich to be a 
> communist.
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> https://mail.zope.org/mailman/listinfo/zope3-users
> 
> 
-- 
View this message in context: http://old.nabble.com/MemoryError-Evolving-a-ZODB-tp34784598p34787382.html
Sent from the Zope3 - users mailing list archive at Nabble.com.



More information about the Zope3-users mailing list