First let me make sure that I understand what the recycle parameter does in 
the pool. Lets say I have a session i never close(), or even a query that 
exceeds this recycle limit to return . When this recycle parameter limit is 
reached the connection will automatically be closed removed from the pool, 
and replaced with a fresh connection. 

If the above statements are true, I would like to use this parameter to 
debug. I am not sure if anyone have used c3p0 from java land, but it has a 
parameter 
unreturnedConnectionTimeout<http://www.mchange.com/projects/c3p0/#unreturnedConnectionTimeout>which
 i believe this is equivalent to the recycle parameter. For debuging 
broken applications it allows you to also set 
debugUnreturnedConnectionStackTraces<http://www.mchange.com/projects/c3p0/#debugUnreturnedConnectionStackTraces>which
 will print the stact trace of what ever called this connection that 
was never returned. This sounds similar to the AssertionPool, however i 
dont think this is what i need. I am trying to figure out what connections 
are opened and never closed, or possibly have a query so bad that its 
taking entirely too long to return (long running queries can be found 
through the postgres long running query log though).

I was hoping someone could give me some advice on how I could debug which 
calls in my application are causing the recycle limit to be hit.

I am not sure i understand AssertionPool, or maybe it use case for 
debugging just doesnt make sense for web applications backends but does for 
other apps. If i understand correctly it simply throws anytime more then 1 
connection is used from the pool.. not sure I understand why you would use 
a pool if you dont want your app to ever use more then 1 connection though.

Thanks in advance for any help in implementing a good debugging solution.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to