In WebSphere Application Server, a ConnectionWaitTimeoutException
is thrown when the connection pool is at its maximum size, all of the
connections are in use by the application, and the application requests
more connections.
If the problem only happens under heavy load, it is likely that the
maximum connection pool size needs to be increased to handle the increased
load.
In other cases, the pool is at its maximum size because connections
have not been explicitly closed by the application to return them to the
free pool; in other words, connections have been leaked.
Connection leaks may be detected by analyzing the connection pool usage
with the Tivoli Performance Viewer.
You may notice a connection leak in an asynchronous bean application
even if the application is closing all of the connections that it obtains
immediately after it finishes using them.
This occurs because a local transaction containment (LTC) is started
when an asynchronous bean is called.
When a connection is obtained in an LTC, the default
behavior is that the connection does not return to the free pool until
the LTC ends. The LTC does not end until the asynchronous bean method
completes.
If the asynchronous bean performs a long-running task, the connection
may remain allocated to the application for a long period of time. The
effect of this is that the connection is leaked. When many connections are
leaked, ConnectionWaitTimeoutExceptions may occur.
|