3 Replies Latest reply: Mar 20, 2012 8:20 AM by Vadim Kopichenko RSS

    Thread BLOCKED on registerConnection/unregisterConnection?

    Andrew Rubinger Master

      Hiya.

      Today we've done a stress test on our application and observed some new behavior - many of the functions that we're delegating to Quartz Scheduler (each with its own Thread) started to take quite a while to complete, and queued up.

      Did a Thread Dump, revealing many of these Threads to be in BLOCKED state, referencing a WeakHashMap while either attempting to register or unregister a connection from the pool.

      Any ideas what could cause this? Incorrectly configured pool size? Not enough DB Connections available?

      Thread: DefaultQuartzScheduler_Worker-23 : priority:7, demon:false, threadId:58, threadState:BLOCKED, threadLockName:java.util.WeakHashMap@6ac57e7d
      
      org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:288)
      org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
      org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
      org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
      org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
      org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
      org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)


      S,
      ALR