Re: [sqlalchemy] SQLAlchemy Memory

2013-01-14 Thread Anoop K
I did some long running tests by *increasing the rate of engine creation/deletion* (total 2 Lakh). Memory increased and then *it remained constant*. With the attached script *top did show* constant memory in MB. However 'ps -o rss PID' indicated the increase in KB. But again I could see

Re: [sqlalchemy] SQLAlchemy Memory

2013-01-13 Thread Anoop K
I tried memory tests by *reusing engine *and memory is steady. I feel some memory is held up even after the release of engine. On Sunday, 13 January 2013 12:21:10 UTC+5:30, Anoop K wrote: gc.collect() was not called in the last sample. Here is one where gc.collect() is also called class

Re: [sqlalchemy] SQLAlchemy Memory

2013-01-13 Thread Anoop K
I tried the test script using merge/add. I am also seeing similar behavior where object count is coming down after 150. However I could see that total process RSS increases as shown below ? When I try with a single engine process RSS always remains constant once it reaches a certain limit .

[sqlalchemy] SQLAlchemy Memory

2013-01-12 Thread Anoop K
Hi, I had POSTed a question(https://groups.google.com/forum/?fromgroups=#!topic/sqlalchemy/vCjrGE9zYwQ) related to session/engine cleanup. After fixing the engine cleanup. I could see that engine and its associated objects are GCed properly. However process memory is gradually increasing. I

Re: [sqlalchemy] SQLAlchemy Memory

2013-01-12 Thread Anoop K
On Sunday, 13 January 2013 11:45:11 UTC+5:30, Michael Bayer wrote: On Jan 13, 2013, at 12:40 AM, Anoop K wrote: Hi, I had POSTed a question( https://groups.google.com/forum/?fromgroups=#!topic/sqlalchemy/vCjrGE9zYwQ ) related to session/engine cleanup. After fixing the engine cleanup

[sqlalchemy] SQLAlchemy Engine cleanup

2013-01-10 Thread Anoop K
It seems engine created using *create_engine* is not freed after cleanup of a session. Object graph indicates that event.listen for pool is holding reference to engine even after session is garbage collected. *What is the right way/api to delete an engine ?* *UseCase* As there are lot of

Re: [sqlalchemy] SQLAlchemy Engine cleanup

2013-01-10 Thread Anoop K
I tried session.bind.dispose() and NullPool. But engine *is still not cleared*. It still seems to have some reference from SessionEventsDispatch = sqlalchemy.event._DispatchDescriptor. On Friday, 11 January 2013 05:24:19 UTC+5:30, Michael Bayer wrote: On Jan 10, 2013, at 8:25 AM, Anoop K

Re: [sqlalchemy] SQLAlchemy Engine cleanup

2013-01-10 Thread Anoop K
, 2013, at 11:55 PM, Anoop K wrote: I tried session.bind.dispose() and NullPool. But engine *is still not cleared*. It still seems to have some reference from SessionEventsDispatch = sqlalchemy.event._DispatchDescriptor. On Friday, 11 January 2013 05:24:19 UTC+5:30, Michael Bayer wrote

[sqlalchemy] Re: SQLAlchemy Engine cleanup

2013-01-10 Thread Anoop K
* *AssertionError* On Thursday, 10 January 2013 18:55:59 UTC+5:30, Anoop K wrote: It seems engine created using *create_engine* is not freed after cleanup of a session. Object graph indicates that event.listen for pool is holding reference to engine even after session is garbage collected. *What

Re: [sqlalchemy] Re: SQLAlchemy Engine cleanup

2013-01-10 Thread Anoop K
subclass when using sessionmaker. Since you don't need a sessionmaker here, please use this form: return Session(bind=engine, expire_on_commit=False) or upgrade to 0.8.0b2. On Jan 11, 2013, at 1:08 AM, Anoop K wrote: I tried the code in my setup.(SQLAlchemy-0.7.8-py2.6). Looks like engine

Re: [sqlalchemy] Re: SQLAlchemy Engine cleanup

2013-01-10 Thread Anoop K
, Anoop K wrote: I tried the code in my setup.(SQLAlchemy-0.7.8-py2.6). Looks like engine did not got GCed. *[anoop@localhost tmp]$ p engtest.py * *about to delete sn...* *about to gc.collect()...* *Traceback (most recent call last):* * File engtest.py, line 31, in module* *assert