Comment 9 for bug 1152815

Revision history for this message
Larry Streepy (lstreepy) wrote :

I'm having a very similar issue with 0.8.0-rc1 and Hibernate 4.2.2. When I start my application and let it sit idle for over an hour, the next connection I try to acquire hangs with the same stack trace as reported, included below. I have not narrowed it down to exactly how long things have to be idle, but I know at 45 minutes things work fine, and at 90 minutes they hang. I've added a connection hook to my system and I'll see if it provides any useful information and report back.

here's the (partial) stack:

   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for <0x00000000c2009228> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2082)
        at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
        at com.jolbox.bonecp.DefaultConnectionStrategy.getConnectionInternal(DefaultConnectionStrategy.java:81)
        at com.jolbox.bonecp.AbstractConnectionStrategy.getConnection(AbstractConnectionStrategy.java:90)
        at com.jolbox.bonecp.BoneCP.getConnection(BoneCP.java:540)
        at com.jolbox.bonecp.provider.BoneCPConnectionProvider.getConnection(BoneCPConnectionProvider.java:178)
        at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:292)