我的Java程序在调用oracle.jdbc.pool.OracleOCIConnectionPool.getConnection时冻结了几分钟

我的Java程序在调用oracle.jdbc.pool.OracleOCIConnectionPool.getConnection时冻结了几分钟,java,connection-pooling,oracle11g,Java,Connection Pooling,Oracle11g,我有一个连接到oracle 11g的Java应用程序。进程在oracle.jdbc.pool.OracleOCIConnectionPool.getConnection方法中冻结2到3分钟。它确实成功地获得了连接,并在3分钟后继续进行,没有任何错误 奇怪的是,当连接到同一个数据库时,同一个程序在不同的机器上运行良好 我搞不懂这是怎么回事。有人能帮我解决这个问题吗 下面是示例程序在使用getConnection方法时的线程转储: Full thread dump Java HotSpot(TM)

我有一个连接到oracle 11g的Java应用程序。进程在
oracle.jdbc.pool.OracleOCIConnectionPool.getConnection
方法中冻结2到3分钟。它确实成功地获得了连接,并在3分钟后继续进行,没有任何错误

奇怪的是,当连接到同一个数据库时,同一个程序在不同的机器上运行良好

我搞不懂这是怎么回事。有人能帮我解决这个问题吗

下面是示例程序在使用
getConnection
方法时的线程转储:

Full thread dump Java HotSpot(TM) Server VM (1.5.0_11-b03 mixed mode):

"Thread-9" prio=10 tid=0x00431a60 nid=0x24 runnable [0xaffff000..0xaffffb70]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-8" prio=10 tid=0x00430e50 nid=0x23 runnable [0xb00ff000..0xb00ff9f0]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-7" prio=10 tid=0x00460490 nid=0x22 runnable [0xb01ff000..0xb01ffa70]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-6" prio=10 tid=0x00249320 nid=0x21 runnable [0xb02ff000..0xb02ff8f0]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-5" prio=10 tid=0x000b7910 nid=0x20 runnable [0xb03ff000..0xb03ff970]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-4" prio=10 tid=0x000b7128 nid=0x1f runnable [0xb04ff000..0xb04ffbf0]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-3" prio=10 tid=0x00126a50 nid=0x1e runnable [0xb05ff000..0xb05ffc70]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-2" prio=10 tid=0x0058bc38 nid=0x1d runnable [0xb06ff000..0xb06ffaf0]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Thread-1" prio=10 tid=0x00125d90 nid=0x1c runnable [0xb07ff000..0xb07ffb70]
        at java.lang.Thread.yield(Native Method)
        at conPoolAppl.run(conPoolAppl.java:101)

"Low Memory Detector" daemon prio=10 tid=0x001c5f50 nid=0x19 runnable [0x00000000..0x00000000]

"CompilerThread1" daemon prio=10 tid=0x001c4de8 nid=0x18 waiting on condition [0x00000000..0xb347e8b4]

"CompilerThread0" daemon prio=10 tid=0x001c3f70 nid=0x17 waiting on condition [0x00000000..0xb357e93c]

"AdapterThread" daemon prio=10 tid=0x001c30f8 nid=0x16 waiting on condition [0x00000000..0x00000000]

"Signal Dispatcher" daemon prio=10 tid=0x001c2388 nid=0x15 waiting on condition [0x00000000..0x00000000]

"Finalizer" daemon prio=10 tid=0x001b5b80 nid=0x14 in Object.wait() [0xb387f000..0xb387faf0]
        at java.lang.Object.wait(Native Method)
        - waiting on <0xe30006d8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0xe30006d8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x001b4e38 nid=0x13 in Object.wait() [0xb397f000..0xb397fb70]
        at java.lang.Object.wait(Native Method)
        - waiting on <0xe30005e8> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:474)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0xe30005e8> (a java.lang.ref.Reference$Lock)

"main" prio=10 tid=0x00036898 nid=0x1 runnable [0xffbfc000..0xffbfcf30]
        at oracle.jdbc.driver.T2CConnection.t2cConnPoolLogon(Native Method)
        at oracle.jdbc.driver.T2CConnection.processOCIConnectionPooling(T2CConnection.java:1103)
        at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:258)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
        at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:148)
        at oracle.jdbc.driver.OracleOCIConnection.<init>(OracleOCIConnection.java:60)
        at oracle.jdbc.driver.OracleOCIConnection.<init>(OracleOCIConnection.java:44)
        at oracle.jdbc.oci.OracleOCIConnection.<init>(OracleOCIConnection.java:35)
        at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:49)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
        at oracle.jdbc.pool.OracleOCIConnectionPool.getConnection(OracleOCIConnectionPool.java:244)
        - locked <0xe3272a78> (a oracle.jdbc.pool.OracleOCIConnectionPool)
        at conPoolAppl.main(conPoolAppl.java:47)

"VM Thread" prio=10 tid=0x001b2d58 nid=0x12 runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x000b8148 nid=0x2 runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x000b8b88 nid=0x3 runnable

"GC task thread#2 (ParallelGC)" prio=10 tid=0x000b95c8 nid=0x4 runnable

"GC task thread#3 (ParallelGC)" prio=10 tid=0x000ba008 nid=0x5 runnable

"GC task thread#4 (ParallelGC)" prio=10 tid=0x000baa48 nid=0x6 runnable

"GC task thread#5 (ParallelGC)" prio=10 tid=0x000bb488 nid=0x7 runnable

"GC task thread#6 (ParallelGC)" prio=10 tid=0x000bbee0 nid=0x8 runnable

"GC task thread#7 (ParallelGC)" prio=10 tid=0x000bd128 nid=0x9 runnable

"GC task thread#8 (ParallelGC)" prio=10 tid=0x000bdb68 nid=0xa runnable

"GC task thread#9 (ParallelGC)" prio=10 tid=0x000be5a8 nid=0xb runnable

"GC task thread#10 (ParallelGC)" prio=10 tid=0x000befe8 nid=0xc runnable

"GC task thread#11 (ParallelGC)" prio=10 tid=0x000bfa28 nid=0xd runnable

"GC task thread#12 (ParallelGC)" prio=10 tid=0x000c0468 nid=0xe runnable

"GC task thread#13 (ParallelGC)" prio=10 tid=0x000c0ea8 nid=0xf runnable

"GC task thread#14 (ParallelGC)" prio=10 tid=0x000c18e8 nid=0x10 runnable

"GC task thread#15 (ParallelGC)" prio=10 tid=0x000c2328 nid=0x11 runnable

"VM Periodic Task Thread" prio=10 tid=0x001c71e0 nid=0x1a waiting on condition
全线程转储Java热点(TM)服务器VM(1.5.0_11-b03混合模式):
“线程9”优先级=10 tid=0x00431a60 nid=0x24可运行[0xAFFF000..0xAFFFB70]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程-8”优先级=10 tid=0x00430e50 nid=0x23可运行[0xb00ff000..0xb00ff9f0]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程7”优先级=10 tid=0x00460490 nid=0x22可运行[0xb01ff000..0xb01ffa70]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程-6”优先级=10 tid=0x00249320 nid=0x21可运行[0xb02ff000..0xb02ff8f0]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程-5”优先级=10 tid=0x000b7910 nid=0x20可运行[0xb03ff000..0xb03ff970]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程4”优先级=10 tid=0x000b7128 nid=0x1f可运行[0xb04ff000..0xb04ffbf0]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程3”优先级=10 tid=0x00126a50 nid=0x1e可运行[0xb05ff000..0xb05ffc70]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程2”优先级=10 tid=0x0058bc38 nid=0x1d可运行[0xb06ff000..0xB06FFF0]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“线程1”优先级=10 tid=0x00125d90 nid=0x1c可运行[0xb07ff000..0xb07ffb70]
位于java.lang.Thread.yield(本机方法)
运行(conPoolAppl.java:101)
“低内存检测器”守护程序prio=10 tid=0x001c5f50 nid=0x19可运行[0x00000000..0x00000000]
“CompilerThread1”守护进程prio=10 tid=0x001c4de8 nid=0x18等待条件[0x00000000..0xb347e8b4]
“CompilerThread0”守护进程prio=10 tid=0x001c3f70 nid=0x17等待条件[0x00000000..0xb357e93c]
“AdapterThread”守护进程prio=10 tid=0x001c30f8 nid=0x16等待条件[0x00000000..0x00000000]
“信号调度器”守护程序prio=10 tid=0x001c2388 nid=0x15等待条件[0x00000000..0x00000000]
Object.wait()中的“Finalizer”守护程序prio=10 tid=0x001b5b80 nid=0x14[0xb387f000..0xb387faf0]
在java.lang.Object.wait(本机方法)
-等待(java.lang.ref.ReferenceQueue$Lock)
位于java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
-锁定(java.lang.ref.ReferenceQueue$Lock)
位于java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
位于java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
对象中的“引用处理程序”守护程序prio=10 tid=0x001b4e38 nid=0x13.wait()[0xb397f000..0xb397fb70]
在java.lang.Object.wait(本机方法)
-等待(java.lang.ref.Reference$Lock)
等待(Object.java:474)
在java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
-锁定(一个java.lang.ref.Reference$Lock)
“主”优先级=10 tid=0x00036898 nid=0x1可运行[0xffbfc000..0xffbfcf30]
在oracle.jdbc.driver.T2CConnection.t2cConnPoolLogon(本机方法)中
位于oracle.jdbc.driver.T2CConnection.processOCIConnectionPooling(T2CConnection.java:1103)
位于oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:258)
位于oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:531)
位于oracle.jdbc.driver.T2CConnection(T2CConnection.java:148)
位于oracle.jdbc.driver.OracleOCIConnection.(OracleOCIConnection.java:60)
位于oracle.jdbc.driver.OracleOCIConnection.(OracleOCIConnection.java:44)
在oracle.jdbc.oci.OracleOCIConnection.(OracleOCIConnection.java:35)
位于oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:49)
位于oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
位于oracle.jdbc.pool.OracleOCIConnectionPool.getConnection(OracleOCIConnectionPool.java:244)
-锁定(一个oracle.jdbc.pool.OracleOCIConnectionPool)
位于conPoolAppl.main(conPoolAppl.java:47)
“VM线程”优先级=10 tid=0x001b2d58 nid=0x12可运行
“GC任务线程#0(并行GC)”优先级=10 tid=0x000b8148 nid=0x2可运行
“GC任务线程#1(并行GC)”优先级=10 tid=0x000b8b88 nid=0x3可运行
“GC任务线程#2(并行GC)”优先级=10 tid=0x000b95c8 nid=0x4可运行
“GC任务线程#3(并行GC)”优先级=10 tid=0x000ba008 nid=0x5可运行
“GC任务线程4(并行GC)”优先级=10 tid=0x000baa48 nid=0x6可运行
“GC任务线程#5(并行GC)”优先级=10 tid=0x000bb488 nid=0x7可运行
“GC任务线程#6(并行GC)”prio=10 tid=0x000bbee0 nid=0x8 runnable
“GC任务线程#7(并行GC)”优先级=10 tid=0x000bd128 nid=0x9可运行
“GC任务线程#8(并行GC)”优先级=10 tid=0x000bdb68 nid=0xa可运行
“GC任务线程#9(并行GC)”优先级=10 tid=0x000be5a8 nid=0xb可运行
“GC任务线程#10(并行GC)”prio=10 tid=0x000befe8 nid=0xc runnable
“GC任务线程#11(并行GC)”prio=10 tid=0x000bfa28 nid=0xd runnable
“GC任务线程#12(并行GC)”优先级=10 tid=0x000c0468 nid=0xe可运行
“GC任务线程#13(并行GC)”prio=10 tid=0x000c0ea8 nid=0xf runnable
“GC任务线程#14(并行GC)”优先级=10 tid=0x000c18e8 nid=0x10可运行
“GC任务线程#15(并行GC)”优先级=10 tid=