Data Source Connection pool running out of connections in JBoss EAP

Application is configured to use a DataSource connection pool and during run time from the logs we see below error’s

  • Unable to get a new connection from a JBoss EAP managed connection pool
  • In JBoss EAP 6 and later IJ000453 and IJ000655 messages such as the following appear together in the server.log
... javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/MyDS
... javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])
... No ManagedConnections available within configured blocking timeout ( 30000 [ms] ]
"ajp-" 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(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(
    at java.util.concurrent.Semaphore.tryAcquire(
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(
    at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(


  • Increase the value for max-pool-size for the connection pool (the default is 20)
  • See the diagnostics section below for details on checking for connection usage and leak issues.
  • In rare cases, it may be sufficient to increase the value for blocking-timeout-millis (default is 30000 milliseconds or 30 seconds).
    • The blocking-timeout-millis element within the datasource timeout settings (see docs/schema/jboss-as-datasources_1_*.xsd) indicates the maximum time in milliseconds that a thread will block while waiting for a connection before throwing an exception.
    • Note that this setting only impacts the block while waiting for an existing connection, and will not impact the block when creating a new connection takes an inordinately long time.
    • This is not usually feasible to resolve IJ000655 errors encountered by end users but may be suitable to address errors encountered during batch processing

Root Cause

  • The IJ000453 exception (in this case) results from the IJ000655 exception
  • The IJ000655: No managed connections available within configured blocking timeout exception (or the EAP 5 and earlier equivalent) is usually seen due to 1 of 3 reasons:
  1. The datasource connection pool has not been tuned (e.g. max-pool-size and blocking-timeout-millis) correctly for the maximum load on the application.
  2. The application is leaking connections because it is not closing them and thereby returning them to the pool.
  3. Threads with connections to the database are hanging and holding on to the connections or slow performance (e.g. due to CPU or memory usage issues) may delay (otherwise rapid) return of connections by worker threads and lead to pool exhaustion.

Sample Datasource tags from Domain or standalone config looks like below

<datasource jta="false" jndi-name="java:/prov2DS" pool-name="prov2DS" enabled="true" use-ccm="false">

























If you get this error monitor the connection pool usage during hight load and plan the max connection pool accordingly . In the lower environments during the load test one should be able to judge these value based on the load test results .

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *