Minimized Connection Request Delays After Loss of DBMS Connectivity Minimizing Connection Request Delay with Seconds to Trust an Idle Pool Connection

Tuning Data Source Connection Pools 10-7

10.2.1.6 Minimized Connection Request Delays After Loss of DBMS Connectivity

If your DBMS becomes and remains unavailable, the data source will persistently test and try to replace dead connections while trying to satisfy connection requests. This behavior is beneficial because it enables the data source to react immediately when the database becomes available. However, testing a dead database connection and trying futilely to replace it can in some cases take as long as the OS network timeout minutes, and can cause long delays to clients before getting the expected failure message.

10.2.1.7 Minimizing Connection Request Delay with Seconds to Trust an Idle Pool Connection

For some applications that use DBMS connections in a lot of very short cycles such as reserve-do_one_query-close, the data sources testing of the connection can contribute a significant amount of overhead to each use cycle. To minimize the impact of connection testing, you can set the Seconds To Trust An Idle Pool Connection attribute in the JDBC data source configuration to trust recently-used or recently-tested database connections and skip the connection test. If Test Reserved Connections is enabled on your data source, when an application requests a database connection, WebLogic Server tests the database connection before giving it to the application. If the request is made within the time specified for Seconds to Trust an Idle Pool Connection, since the connection was tested or successfully used by an application, WebLogic Server skips the connection test before delivering it to an application. If Test Frequency is greater than 0 for your data source periodic testing is enabled, WebLogic Server also skips the connection test if the connection was successfully used and returned to the data source within the time specified for Seconds to Trust an Idle Pool Connection. For instructions to set Seconds to Trust an Idle Pool Connection, see Configure testing options for a JDBC data source in the Oracle WebLogic Server Administration Console Help. Seconds to Trust an Idle Pool Connection is a tuning feature that can improve application performance by minimizing the delay caused by database connection testing, especially during heavy traffic. However, it can reduce the effectiveness of connection testing, especially if the value is set too high. The appropriate value depends on your environment and the likelihood that a connection will become defunct.

10.2.2 Database Connection Testing Configuration Recommendations