4 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: MemoryError in unito...
FromSent OnAttachments
Brandon Goldfedder24 Apr 2007 07:58 
Michael Bayer25 Apr 2007 04:15 
Brandon Goldfedder27 Apr 2007 08:44 
Michael Bayer27 Apr 2007 09:24 
Subject:[sqlalchemy] Re: MemoryError in unitofwork.py
From:Brandon Goldfedder (bgol@gmail.com)
Date:04/27/2007 08:44:37 AM
List:com.googlegroups.sqlalchemy

Okay - next dump quesion: How do I clear out the objects in a session that I no longer need to reference (in this case all of them)... Will python GC take care of this?

--Brandon

On Apr 25, 7:15 am, Michael Bayer <mike@zzzcomputing.com> wrote:

On Apr 24, 2007, at 10:59 AM,BrandonGoldfedder wrote:

I'm doing a fair number of session flushes as I update my data in the database. After about 53 of them (or so) I am getting the following exception:

File "build\bdist.win32\egg\sqlalchemy\orm\session.py", line 294, in flush File "build\bdist.win32\egg\sqlalchemy\orm\unitofwork.py", line 181, in flush MemoryError

Anyone have any ideas: My code is simply adding new entries and every 1000 entries flushing the objectstore.

the session doesnt clear itself out after a flush, so with each successive save() of objects memory will grow.