[Zope3-Users] How to debug a MemoryError

Jonathan dev101 at magma.ca
Thu May 15 15:23:49 EDT 2008


>----- Original Message ----- 
>From: "Encolpe Degoute" <encolpe.degoute at ingeniweb.com>
>To: <zope3-users at zope.org>
>Sent: Thursday, May 15, 2008 2:34 PM
>Subject: Re: [Zope3-Users] How to debug a MemoryError
>

>2008/5/15 Jonathan <dev101 at magma.ca>:
>
>>
>> "Encolpe Degoute" <encolpe.degoute at ingeniweb.com>
>>
>>
>>  Hello,
>>> During a big migration process in which files are extracted from Data.fs
>>> to be put on the filesystem the Zope 2.7 server that we use always hits
>>> a MemoryError.
>>> It's not always on the same file, but always on the same call and with
>>> the same memory consumption: 2.7GB. Code below:
>>>
>>
>> It sounds like you are accessing the Data.fs file via the Zope server
>> (external method?). Have you tried accessing the Data.fs file directly 
>> (ie.
>> make a copy of your Data.fs file and write a stand-alone python routine 
>> to
>> pull the objects out and write them to the filesystem)?
>
>
>I don't know how to create such a python routine on ZODB 3.2.5. Where can I
>can some examples of such routine?


from ZODB import FileStorage, DB
storage = FileStorage.FileStorage('/<your dir path here>/Data.fs')
db = DB(storage)
conn = db.open()
root = conn.root()

'root' is then the root folder that you see via the ZMI.

More info at  http://www.zope.org/Wikis/ZODB/guide/node3.html


Jonathan 



More information about the Zope3-users mailing list