Riccardo Minet wrote:
> Module relstorage.relstorage, line 983, in poll_invalidations
> Module relstorage.relstorage, line 154, in _restart_load
> Module relstorage.adapters.oracle, line 351, in restart_load
> 
> DatabaseError: ORA-03135: connection lost contact

It's happening right at a point where RelStorage is designed to 
reconnect automatically, but cx_Oracle is raising the wrong exception. 
Look at line 353 of relstorage/adapters/oracle.py.  RelStorage knows 
what to do if cx_Oracle raises OperationalError or InterfaceError, but 
cx_Oracle raises DatabaseError instead.  Shame on cx_Oracle: any 
disconnection should be an operational error, not a generic database error.

There's an easy fix.  I'd like you to change line 353 to handle 
DatabaseError in addition to the error types it already handles.  It 
currently looks like this:

     except (cx_Oracle.OperationalError, cx_Oracle.InterfaceError), e:

Change it to this:

     except (cx_Oracle.OperationalError, cx_Oracle.InterfaceError,
         cx_Oracle.DatabaseError), e:

If that change works, I will include it in the next release of RelStorage.

Shane

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to