On Dec 4, 4:32 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> if the error message isnt caught by is_disconnect(), then yes the
> specific error message should be installed in there.  But also note
> that psycopg2 has some specific issues with disconnects, namely that
> the exception is not always raised cleanly..i had discussed this on
> the psycopg2 list and supplied test scripts illustrating the issue but
> i dont know if anyone took the time to verify what i was
> illustrating.  by "not clean" i mean the exception would get thrown in
> an "asynchronous" fashion so that we really couldnt catch it at all.
> ive seen tickets in psycopg2's trac which seem to address related
> issues.

yeah, the more i think about it, the more i realize this is an error
when the dbapi connection is created, it's not a disconnect
condition.  the original error message is "No route to host", which
I'm pretty sure is EHOSTUNREACH, which you get on a socket connect,
not on a send.  which means that yep, this is likely an async
problem...the connection seems to be fine when you create it, but when
you use it, it throws the connection error.

> but also, that you were getting "this connection is closed" would
> indicate that a recycle did occur, although if you have pool logs that
> would describe it more clearly.  But i wonder if you had long running
> Connection objects opened; at the moment, the Connection itself doesnt
> get a hold of a new DBAPI connection when a recycle occurs, youd have
> to open a new Connection.  Ive been meaning to change this behavior in
> trunk so that even holding open Connection would still allow a new
> recycle to happen.  Just curious how you configured on that end.

it's a long-running multi-threaded daemon process, using a TLEngine
and all implicit connections.  the lifespan of the sessions are pretty
short, so i've assumed my threads weren't holding an open connection
object.  haven't configured pool logging to test it yet, though.
suppose it's a good time to learn how to do that in 0.4 now.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to