On Mar 17, 2011, at 10:15 PM, Jaimy Azle wrote:

> 
> Dear All,
> 
> Having a logging functionality to trace creation, checkout, and
> checkin connection from pool is very helpfull. however is there a way
> to identify connection which has not been returned back to the pool
> for a period of time?
> 
> I suspect I had a stale connection object which does not returned back
> to the pool in my code but i cannot sure, I just get the database
> server run out of bufferpool stating i have too many uncommitted
> rowset after running for few days.


there's a lot of detail missing there, what is the exact error message, what DB 
is this (sounds like SQL server). The best way is to use monitoring on the 
database to identify connections and/or transactions that have been opened for 
a long time.   There are system views and such which provide this information.

a minute of google provided this for SQL server:   "select * from sysprocesses 
where open_tran > 0"  Might want to try that.


> 
> I don't understand, i did commit/rollback consistently for every,
> mostly probably, data manipulation routine in my code. And at final
> execution i did recheck any active transaction left and do rollback
> before returning the session back to the pool. Lastly, the pool has
> also been configured to recycle connection after 2 minutes to ensure
> no pending transaction left.
> 
> However, i might be missed here.
> 
> sqlalchemy.pool.QueuePool.0x...0x2:Connection <PyConnection object at 0xa7d 
> ... > exceeded timeout; recycling
> sqlalchemy.pool.QueuePool.0x...0x2:Closing connection <PyConnection object at 
> 0xa7d ... >
> sqlalchemy.pool.QueuePool.0x...0x2:Created new connection <PyConnection 
> object at 0xc70 ... >
> sqlalchemy.pool.QueuePool.0x...0x2:Connection <PyConnection object at 0xc70 
> ... > checked out from pool
> sqlalchemy.pool.QueuePool.0x...0x2:Connection <PyConnection object at 0xc70 
> ... > being returned to pool
> 
> -- 
> Salam,
> 
> -Jaimy Azle
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to