On Dec 4, 2007, at 3:26 PM, David Bonner wrote:
>
> Hi, I've run into a problem running SA 0.4.0 on top of psycopg2. We
> had a DNS hiccup, and the next attempt to execute a query triggered a
> ProgrammingError. Unfortunately, it seems that error didn't also
> invalidate the (implicit) connection, which was then returned to the
> pool.
>
> Successive queries returned a couple different errors (I can track
> down the exact sequence of errors if you need it) but eventually we
> end up getting InvalidRequestError("This connection is closed") every
> time we run a query. The backtrace looks something like:
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.
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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---