prepareStatement(Sql,Generatedcols) Hangs if Sum(Length(Column_names) >= 800

(Doc ID 1271077.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version: 10.2.0.1 to 11.2.0.2 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms

PreparedStatement with auto generated keys hangs when the sum of the length of all column names are bigger or equal then 800.

This is the java stack trace when the "hang" occurs:

at oracle.jdbc.driver.T2CConnection.t2cDescribeTable(Native Method)
at oracle.jdbc.driver.T2CConnection.doDescribeTable(T2CConnection.java:3365)
at
oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.jav
a:6427)
at oracle.jdbc.driver.T2CConnection.prepareStatement(T2CConnection.java:47)
..


pstack output:

#0 0x00002b5b6a731566 in poll () from /lib64/libc.so.6
#1 0x00002aaae1ae68a1 in ntevpque ()
#2 0x00002aaae1ae282e in ntevqone ()
#3 0x00002aaae1a71620 in nsevwait ()
#4 0x00002aaae2695b14 in nsevbrecv ()
#5 0x00002aaae32ce692 in nioqrc ()
#6 0x00002aaae33205c3 in ttcdrv ()
#7 0x00002aaae32d0d35 in nioqwa ()
#8 0x00002aaae32aa4eb in upirtrc ()
#9 0x00002aaae32b607a in kpurcsc ()
#10 0x00002aaae19fb45f in kpudsany ()
#11 0x00002aaae19c2868 in OCIDescribeAny ()
#12 0x00002aaae14569fc in
Java_oracle_jdbc_driver_T2CConnection_t2cDescribeTable () from
/u02/app/oracle/product/11.2.0/dbhome_1/lib/libocijdbc11.so
#13 0x00002aaaab9ca4fd in ?? ()
#14 0x00000000411bf918 in ?? ()
#15 0x0000000000000000 in ?? ()


The Thread is actually spinning (takes cpu) and is continuously requesting a describe for the table. (causing network roundtrips)

Changes

change jdbc Connection type from thin to oci

or

added columns, adapted column names

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms