My Oracle Support Banner

How To Pass oracle.jdbc.ReadTimeout To The JVM With JDBC To Avoid Hangs on SocketRead ? (Doc ID 1535858.1)

Last updated on FEBRUARY 03, 2022

Applies to:

JDBC - Version 10.2.0.1 to 12.2.0.0.0 [Release 10.2 to 12c]
Information in this document applies to any platform.

Symptoms

System property -Doracle.jdbc.ReadTimeout is set to configure Oracle JDBC driver 10g timeouts to avoid hangs on socketRead when there is a database outage or Network problem.
However, it is noticed that it does not take effect as per the thread dump:


<ExecuteThread: '61' for queue: '...' has been busy for "736" seconds
working on the request "weblogic.work.ExecuteRequestAdapter@2fcc33", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
oracle.net.ns.Packet.receive(Unknown Source)
oracle.net.ns.NSProtocol.connect(Unknown Source)
oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:856)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:268)
oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:439)
oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)

The expected result is:

java.sql.SQLException: Io exception: Socket read timed out

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.