Better detection of postgresql connection disconnect

Issue #2044 resolved
Former user created an issue

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)

  1. Log in to comment