Timer Threads Build Up in UCP 12.1.0.2 (Doc ID 2164577.1)

Last updated on MARCH 06, 2017

Applies to:

Universal Connection Pool - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Goal

When using Oracle UCP 12.1.0.2.0, over time a large number of Timer threads build up which eventually trigger daemon thread count alerts and eventually cause Out Of Memory errors.

"UCP-worker-thread-4" #74 daemon prio=5 os_prio=0 tid=0x00007f8b15b99000 nid=0x420f waiting on condition [0x00007f8acba78000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006dd652eb0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:403)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"oracle.jdbc.driver.BlockSource.ThreadedCachingBlockSource.BlockReleaser" #72 daemon prio=4 os_prio=0 tid=0x00007f8b15f9e800 nid=0x420d in Object.wait() [0x00007f8acbcfa000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource$BlockReleaser.run(BlockSource.java:327)
- locked <0x00000006da39cfc8> (a oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource$BlockReleaser)

"Timer-3" #71 daemon prio=5 os_prio=0 tid=0x00007f8b15f98800 nid=0x420c in Object.wait() [0x00007f8acbf3b000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x00000006dd83ea78> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)

"UCP-worker-thread-3" #70 daemon prio=5 os_prio=0 tid=0x00007f8abc001800 nid=0x420b waiting on condition [0x00007f8acbf7c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006dd652eb0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:403)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"Timer-2" #69 daemon prio=5 os_prio=0 tid=0x00007f8b15f97000 nid=0x4209 in Object.wait() [0x00007f8acbfbd000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.util.TimerThread.mainLoop(Timer.java:552)
- locked <0x00000006de22c280> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:505)

This has been determined  to be related to unpublished bug:21187539 - UCP is marking connections in the pool as closed for no apparent reason, fixed in UCP 12.2.
Is there a patch for UCP version 12.1.0.2?



Solution

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