[prev in list] [next in list] [prev in thread] [next in thread]
List: zodb-dev
Subject: Re: [ZODB-Dev] memory exhaustion problem
From: Chris McDonough <chrism () plope ! com>
Date: 2008-01-18 15:18:11
Message-ID: CCBD9AC0-12DF-470D-9AD0-DD53F225D0D3 () plope ! com
[Download RAW message or body]
Assuming "u" is a persistent object, try:
for k, u in user_root['userdb'].items():
# write the data to sqlite
u._p_deactivate()
- C
On Jan 17, 2008, at 10:07 AM, Flavio Coelho wrote:
> Hi,
>
> I wrote a simple script to move data from a ZODB database to sqlite.
> My data is in a OOBTree, I chose this because supposedly you can
> bring the buckets to memory one at a time....
>
> So what I am doing is basically this: I iterate over my objects and
> write them one-by-one to the other db.
> for k,u in user_root['userdb'].items(): # I have tried iteritems()
> here too but the results are the same....
> # write the data to sqlite
>
> My problem is that my database is big and as the memory consumption
> increases as the loop progresses until all my memory is exhauted and
> the OS goes into swap. It seems that the objects from previous
> iterations are not been cleared from memory.
> Am I doing something wrong, or is it impossible to iterate over a
> ZODB database which is bigger than you memory?
>
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic