All Forums Connectivity
iliaflax 2 posts Joined 04/11
16 May 2011
Threads hanging permanently on Teradata requests

Hi,

I'm using JDBC to query a Teradata server. There are up to 100 simultaneous requests, each one using a fresh connection, and closing it at the end. After some hours of work, some of the threads performing the requests get stuck indefinitely. Eventually a restart is needed.
From inspecting the call stacks, I see that the threads are in a socket read state, and that it happens when preparing a statement or when closing the connection:

Case 1:
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(TDNetwo rkIOIF.java:649)
at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream( TDPacketStream.java:818)
at com.teradata.jdbc.jdbc_4.statemachine.StatementReceive State.action(StatementReceiveState.java:125)
at com.teradata.jdbc.jdbc_4.statemachine.StatementControl ler.runBody(StatementController.java:112)
at com.teradata.jdbc.jdbc_4.statemachine.StatementControl ler.run(StatementController.java:103)
at com.teradata.jdbc.jdbc_4.Statement.executeStatement(St atement.java:340)
at com.teradata.jdbc.jdbc_4.Statement.prepareRequest(Stat ement.java:507)
- locked <0x00002aab4f787518> (a com.teradata.jdbc.jdbc_4.PreparedStatement)
at com.teradata.jdbc.jdbc_4.PreparedStatement.(PreparedSt atement.java:66)
at com.teradata.jdbc.jdbc_4.TDSession.createPreparedState ment(TDSession.java:723)
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalPreparedSta tement.(TeraLocalPreparedStatement.java:89)
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection. prepareStatement(TeraLocalConnection.java:333)
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection. prepareStatement(TeraLocalConnection.java:152)
...

Case 2:
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(TDNetwo rkIOIF.java:649)
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(Ge nericLogOffRspState.java:66)
at com.teradata.jdbc.jdbc.GenericLogoffController.run(Gen ericLogoffController.java:43)
- locked <..> (a com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF)
at com.teradata.jdbc.jdbc_4.TDSession.close(TDSession.jav a:476)
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection. close(TeraLocalConnection.java:259)
...

I'm using the latest driver version (13.10.00.10)

Any idea why it happens?
This issue is very painful for us and any help will be appreciated.

Thanks!

Tags:
tomnolan 594 posts Joined 01/08
16 May 2011

In the stack traces you listed, the Teradata JDBC Driver is waiting for a response from the Teradata Database.

If the problem is reproducible, then I recommend that you open an incident with Customer Support.

You must sign in to leave a comment.