Description
I'm using ConnectionPool
with DeadConnectionDetector
. Here's my connection function, if it helps.
This morning, my primary database failed, which happened to be during a period of high-frequency querying. So of course, psycopg2.OperationalError
appears several times, before it was replaced with ConnectionDead
. Shortly thereafter, my standby server was promoted to master. txpostgres was then able to reconnect, which [I assume] it did. But then, immediately, the following error starts: psycopg2.ProgrammingError: execute cannot be used while an asynchronous query is underway
. As far as I can tell, no queries were successfully executed until I restarted the app.
I've been digging around the txpostgres code to try to find how this could happen, but I haven't had any enlightenment so far. I was wondering if you might have any ideas.
Here are some tracebacks, but—as is usual for Twisted—they aren't very helpful.