|
|
Question : WAS - Connection Pool issue
|
|
Hi,
I am getting following error in WAS 5.1 env. The Connection Pool Manager could not allocate a Managed Connection: com.ibm.websphere.ce.j2c.ConnectionWaitTimeoutException: Connection not available, Timed out waiting for 120002 at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1100) at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1797) at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:712) at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:465) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:242) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:215)
thanks,
|
Answer : WAS - Connection Pool issue
|
|
BackGround:
The error message indicates there are no free connections available. When creating the connection pools , you will specify the min and max connections to create. The webSphere start the pool by creating the min connections and increas up to max connections based on load.
Potential cause of the Problem :
1) The max connections parameter specified is not sufficient for the load on the application
OR
2) The application is holding on to the connections long enough so that other threads are waiting for free connections and timing out
OR
3) The connections are not being released to the pool.
Solution:
Increase the max connections parameter in the connection pool properties. Please let me know if you need help with this.
AND/ OR
Please check your application code if the application is clossing the connections properly OR holding on to the connections for longer than required. If the application is not using the connections properly bumping up the max connections will not help. It will only delay the problem.
Best practice with connection pools is to get the connection in the method , perform the processing and close the connection rather than get a connection perform multiple operations and close the connection in the end. (One exception is when all the operations participate in the same transaction)
Hope this helps.
|
|
|
|
|