Joined: Mon Jan 02, 2017 5:47 am Posts: 2
|
Hello,
Since upgrading hibernate to 5.2.6 I am having issues starting my webapp which runs on tomcat. I get lots of these threads hanging on statup and eventually runs out of pool threads and hans the server. It does not happen all the time but when the server is under load ie running slowly and when booting up seems to make it worse. I have not changed my code for ages other than updating all the queries to CriteriaBuilder.
I have upgraded to tomcat 8.5.9 and the jdk8 to v112 and changed the pool to from commons.dbcp to commons.dbcp2 but has made no difference. I have been through my code and cannot find anything that would cause it to wait.
Any ideas how I can find out what it is waiting on?
Here is the a dump of the thread:
"ajp-nio-8009-exec-31" #63 daemon prio=5 os_prio=0 tid=0x000000001a9f7800 nid=0xf63 waiting on condition [0x00002afd5f0c6000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000d1042c50> (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 org.apache.commons.pool2.impl.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:583) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:442) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134) at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:35) at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:99) at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:129) at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:247) at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:254) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:203) at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:56) at org.hibernate.internal.AbstractSharedSessionContract.beginTransaction(AbstractSharedSessionContract.java:401) at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:355) at com.sun.proxy.$Proxy65.beginTransaction(Unknown Source) at org.events.business.hibernate.HibernatePersistenceStrategy.getSession(HibernatePersistenceStrategy.java:99) at org.events.business.hibernate.HibernateWebsiteManagerImpl.getWebsiteDetailByHandle(HibernateWebsiteManagerImpl.java:319) at org.events.business.WebsiteManagerImpl.getWebsiteByHandle(WebsiteManagerImpl.java:252) at org.events.business.WebsiteManagerImpl.checkWebsiteByHandle(WebsiteManagerImpl.java:170) at org.events.ui.rendering.WebsiteRequestMapper.isWebsite(WebsiteRequestMapper.java:389) at org.events.ui.rendering.WebsiteRequestMapper.handleRequest(WebsiteRequestMapper.java:118) at org.events.ui.rendering.filters.RequestMappingFilter.doFilter(RequestMappingFilter.java:107) .......
Cheers Greg
|
|