ORA-03114 코드를 처리해서 재 접속하는 코드를 추가하면됩니다.
import re,cx_Oracle
ser = re.search('ORA-(\d+):\s+', sys.exc_value.__str__())
# DatabaseError: ORA-03114: not connected to ORACLE
if ser and (ser.group(1) == '03114'):
self.close()
self.connectOracle(self.dbId, self.dbPasswd, self.dbTnsName )
else:
__LOG__.Exception()
__LOG__.Trace( "OracleDao(PS_BTS_CLASS) execute error: ", sys.exc_info() )
return None