How to resolve error:"java.sql.SQLException: [tibcosoftwareinc][Oracle JDBC Driver][Oracle]ORA-02396: exceeded maximum idle time, please connect again."

How to resolve error:"java.sql.SQLException: [tibcosoftwareinc][Oracle JDBC Driver][Oracle]ORA-02396: exceeded maximum idle time, please connect again."

book

Article ID: KB0073800

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database 7.2

Description

 For the Oracle 11g,12c database has two configurations as:
1. resource_limit = <true/false>;
2. For profile limit,  idle_time  <Minutes>

If DBA configured above properties as well as if ADB adapter idle for the given idle_time <Minutes> and after the idle_time if any records available for process then ADB adapter throws error as:
 "java.sql.SQLException: [tibcosoftwareinc][Oracle JDBC Driver][Oracle]ORA-02396: exceeded maximum idle time, please connect again."
 

Issue/Introduction

Follow one of the resolution approach

Environment

================== Product: TIBCO ActiveMatrix BusinessWorks Plug-in for Database Version: 7.2 OS: All Supported Operating Systems ==================

Resolution

To resolve the above error there are three approaches:

1.Set the idle time to unlimited on the Oracle database. 
alter profile <profile_name> limit idle_time UNLIMITED;

2. Set Maximum Number of Reconnect Attempts and Interval between Reconnect Attempts (milliseconds) on ADB adapter instance.
If these parameters are set the above error will persist but the adapter will reconnect to DB and continue the processing of records.

3. Set following ADB adapter properties in adbagent.tra or in application.tra to refresh the database connection which is idle from a long time after given specific interval.

[A] adb.connDBRefreshInterval <Minutes >: 
This is an instance-level parameter, which specifies a time after which the adapter triggers a timer for refresh connection. The default value is 300 minutes.
[B] adb.connDBRefresh on:
This is an instance-level parameter, which indicates that every service under an instance can refresh a connection after a configured time elapses. Its default value is off. An instance has only one-timer while the service does not have a timer. When the adb.connDBRefresh property is set to on, a timer is created.

Set "adb.connDBRefreshInterval" as per requirement and It should be less than database idle time value.