[Zope3-Users] How to debug a MemoryError
Encolpe Degoute
encolpe.degoute at ingeniweb.com
Thu May 15 13:57:26 EDT 2008
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:
try:
file_data = attachment.getFile()
except MemoryError, error:
LOG('', INFO, os.path.join(parent_path, attachment.getFilename()))
raise error
f = file(os.path.join(parent_path, attachment.getFilename()), 'w')
f.write(file_data)
f.flush()
f.close()
I tried to split the migration in smaller steps and saw that can happen
after 2500 files like after 'only' 400 files.
Any idea to debug and optimize such a problem ?
Regards,
--
Encolpe Degoute
INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632
Bureaux de la Colline
1 rue Royal
92210 Saint Cloud
web : www.ingeniweb.com - « les Services Web Ingénieux »
Tel : 01.78.15.24.08 / Fax : 01 47 57 39 14
More information about the Zope3-users
mailing list