From 79b89d79b08ec6cb9edfe874febc8db0f358bfd9 Mon Sep 17 00:00:00 2001 From: Radko Krkos Date: Tue, 21 May 2019 12:27:48 +0200 Subject: [PATCH 3/3] Fix: Fixed mentat-storage failing on DB restart. * This is not a complete fix as there is a race condition and if the timing is right, some events are still not stored properly. Also, if the DB outage is longer, the error queue grows. * This allows for recovery once the DB is running again. (Redmine issue: #4569) --- lib/mentat/services/eventstorage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mentat/services/eventstorage.py b/lib/mentat/services/eventstorage.py index 16870449..1bd6decb 100644 --- a/lib/mentat/services/eventstorage.py +++ b/lib/mentat/services/eventstorage.py @@ -751,7 +751,7 @@ class EventStorageService: self.rollback() raise DataError(str(err)) from err - except psycopg2.OperationalError as err: + except (psycopg2.OperationalError, psycopg2.InterfaceError) as err: self.__init__() exc_store = err continue -- 2.14.5