[sqlalchemy] Re: My sqlalchemy.orm.identity.IdentityManagedState is leaking

2009-04-08 Thread Gregg Lind
I believe you want session.expunge() or session.expunge_all(). GL On Wed, Apr 8, 2009 at 6:05 PM, Chris Lewis cfle...@gmail.com wrote: Hi everyone! I have a threaded application which deals with a lot of records (it generates hundreds of thousands in an hour). I have a Database module

[sqlalchemy] Re: My sqlalchemy.orm.identity.IdentityManagedState is leaking

2009-04-08 Thread Chris Lewis
Something I've realized is that all objects are cascading from a large one. There's a large staff object, which then has a collection of people objects which then have a collection of people statistics objects. This might well be the problem. If so, how can I tell SQLA to commit to the database

[sqlalchemy] Re: My sqlalchemy.orm.identity.IdentityManagedState is leaking

2009-04-08 Thread Chris Lewis
Hi Gregg, Changing the Session.remove() to an expunge_all doesn't have any effect, the growth continues. Chris On Apr 8, 4:10 pm, Gregg Lind gregg.l...@gmail.com wrote: I believe you want session.expunge() or session.expunge_all(). GL On Wed, Apr 8, 2009 at 6:05 PM, Chris  Lewis

[sqlalchemy] Re: My sqlalchemy.orm.identity.IdentityManagedState is leaking

2009-04-08 Thread Chris Lewis
Breakthrough: Using Gregg's expunge_all, then commenting out the addition to collections, SQLA is not leaking anymore. Inside my team object, I go in then create the people and their statistics, but I don't add the people to the team collection anymore. The links are never used again, but it's a

[sqlalchemy] Re: My sqlalchemy.orm.identity.IdentityManagedState is leaking

2009-04-08 Thread Chris Lewis
Inside my team object, I go in then create the people and their statistics, but I don't add the people to the team collection anymore. The links are never used again, but it's a many-to-many relationship (a person can be on several teams), so I thought I needed to do this in order to get