Connection close not returning

Connectivity

Connection close not returning

The phenomenon

The operation Connection.close() on a Teradata connection sometimes gets blocked forever.

The relevant java stack trace

java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:474)
at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:818)
at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:794)
at com.teradata.jdbc.jdbc.GenericLogOffRspState.action(GenericLogOffRspState.java:66)
at com.teradata.jdbc.jdbc.GenericLogoffController.run(GenericLogoffController.java:43)
- locked <0x00002aab618d8af0> (a com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF)
at com.teradata.jdbc.jdbc_4.TDSession.close(TDSession.java:472)
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.close(TeraLocalConnection.java:255)

The teradata driver we use

com.teradata.jdbc.TeraDriver
From terajdbc4-13.10.00.10.jar

The code that closes the connection

static public void JdbcClose(Connection conn) {
try {
if (conn != null)
conn.close();
} catch (SQLException e) {
logger.warn("Unable to dispose of SQL connection properly.", e);
}
}

Can anyone help with this ?

Is there a way to brutely close the thread or call conn.close() with a timeout ?

Thanks,

Ilia
Tags (1)