[Twisted-Python] Making ConnectionPool not pool
hs at ox.cx
Tue Nov 27 04:16:35 EST 2012
I have a really bad time with the combination of a low-volume service and adbapi.ConnectionPool, pyodbc, FreeTDS and Sybase.
Basically my connections just time out and fail in weird, generic ways like:
Error: ('01000', ' [FreeTDS][SQL Server]Unexpected EOF from the server (20017) (SQLEndTran)')
(but in many others too, there is no real pattern)
In my desperation, I’m employing for-loops for the SQL queries now. :(
Since there isn’t much traffic (yet) I would like to just make ConnectionPool close the connections and re-open fresh ones, as soon as they are necessary.
Is there some straight-forward way to do that? Or any better approach I’ve overlooked?
More information about the Twisted-Python