Jonathan Vanasco
2014-06-10 18:24:24 UTC
I had to restart postgresql , and that triggered some endless errors in my logs.
i don't have anything that can handle a suddenly dropped / resumed connection.
does anyone have a recommendation for trying to reconnect or handle this in general
from what I can tell from my logs...
When I catch an error, my cleanup code tries to
self._connection.rollback()
which raises
psycopg2.InterfaceError: connection already closed
My immediate thoughts are:
1. catching the correct disconnect error
2. telling the connection/pool to reconnect
i don't have anything that can handle a suddenly dropped / resumed connection.
does anyone have a recommendation for trying to reconnect or handle this in general
from what I can tell from my logs...
When I catch an error, my cleanup code tries to
self._connection.rollback()
which raises
psycopg2.InterfaceError: connection already closed
My immediate thoughts are:
1. catching the correct disconnect error
2. telling the connection/pool to reconnect