Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

JBoss EAP で、JDBC コネクションプールのコネクションを使い果たす

Solution Verified - Updated -

Issue

  • アプリケーションサーバーが、コネクションプール内で利用できるコネクションを使い果たします。
  • "No ManagedConnections available within configured blocking timeout" メッセージが server.log ファイルに表示されます。
javax.resource.ResourceException:IJ000655:No managed connections available within configured blocking timeout (30000 [ms])
  • DB コネクションプールが枯渇しました。
  • 以下のように、多くのスレッドが待ち状態になり、サーバーがハングします。

    "ajp-127.0.0.1-8009-1" daemon prio=10 tid=0x00002aaabde44000 nid=0x106c waiting on condition [0x000000004d2b7000]
       java.lang.Thread.State:TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x000000078f4a3140> (a java.util.concurrent.Semaphore$FairSync)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1011)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1303)
        at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:383)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:193)
        at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:747)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
        at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
    

コネクションを取得しようとしているアプリケーションコードのスタックトレースが出力され、どのデータソースからコネクションが取得できなかったのか分かります。

java.sql.SQLException: javax.resource.ResourceException:IJ000453:Unable to get managed connection for java:jboss/datasources/ExampleDS
    at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147)
    at com.jboss.examples.jdbc.SQLHelper.getConnection(SQLHelper.java:90)
        ...
Caused by: javax.resource.ResourceException:IJ000453:Unable to get managed connection for java:jboss/datasources/ExampleDS
    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:390)
    at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
    at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)
    ...33 more
Caused by: javax.resource.ResourceException:IJ000655:No managed connections available within configured blocking timeout (30000 [ms])
    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:383)
    at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
    at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
    at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
    ...36 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4
    • 5
    • 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In