i dont totally understand whats going on there. if the connections
cant open and then they all time out, eventually the "connectionrecord"
that is trying to make the connection should get returned to the pool,
once the reference to the connection in your code is released...so you
shouldnt need the dispose() in theory (but ive never tested such a
scenario so theres many reasons i could be wrong).
so to just get dispose() to work correctly, verify for me that this
patch works:
Index: lib/sqlalchemy/pool.py
===================================================================
--- lib/sqlalchemy/pool.py (revision 2152)
+++ lib/sqlalchemy/pool.py (working copy)
@@ -373,7 +373,8 @@
conn.close()
except Queue.Empty:
break
-
+ self._overflow = 0 - self.size()
+
def status(self):
tup = (self.size(), self.checkedin(), self.overflow(),
self.checkedout())
return "Pool size: %d Connections in pool: %d Current
Overflow: %d Current Checked out connections: %d" % tup
and then ill just check it in.
also, the connections you get back from the pool also have an
invalidate() method on them, which will cause them to reconnect the
next time they are accessed. not sure if that helps here.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---