On Mar 18, 2011, at 1:59 PM, Jaimy Azle wrote:

> 
> Yes, DB2 does have those feature. However, it does not help much since
> those number shown is biased because either actively used connection,
> stale connection object (if any), and iddle connection kept in the
> pool were also listed there.

DB2 may have a system that lists out individual connections and transactions as 
well as active statements.    That would be a preferable system to just "a 
number".

Otherwise use a PoolListener and add every connection checked out to a global 
set, remove every returned connection from the set.  Inspect the set to see 
what isn't getting returned.   

http://www.sqlalchemy.org/docs/core/interfaces.html#sqlalchemy.interfaces.PoolListener


More aggressive: store the time checked out with each connection in the set.  
Store the current stack dump via traceback.print_stack() as well.   Look for 
connections older than N seconds, look at the traceback.  That is the exact 
line number where the offending connection was acquired.




> 
> -- 
> Salam,
> 
> -Jaimy Azle
> 
> “+1 for stating fact: Perl is dead. Please 
>    don't bring it back” – Matt Joiner
> “-1 for spreading FUD about perl. It's 
>    absolutely not dead.” – Daenyth
> “+1 + -1 = 0, then, is perl a zombie?” – joaquin
>    -- http://stackoverflow.com/questions/3384385/python-3-2-gil-good-bad
> 
> -- 
> 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