Better detection of postgresql connection disconnect
Issue #2044
resolved
Current code which detects if a connection is disconnected tests for two conditions under OperationalError case:
if isinstance(e, self.dbapi.OperationalError):
return 'closed the connection' in str(e) or 'connection not open' in str(e)
Hovewer, sometimes I get the following error which should also be included:
OperationalError: (OperationalError) could not receive data from server: Software caused connection abort (0x00002745/10053) 'SELECT ...'
Comments (3)
-
repo owner -
repo owner - changed status to resolved
f473398f0170a00b0e760a7dba292087144c7e45
1b3eb80b52773b8cc268d321379984a0572b7329
however this approach won't work on any alternate locales. See
#2045for a newer approach -
repo owner - removed milestone
Removing milestone: 0.6.7 (automated comment)
- Log in to comment
is that psycopg2 ?