Cannot Allocated A Connection From The GlassFish Server JDBC Connection Pool Due To In-use Connections Equal max-pool-size (Doc ID 1473945.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version 2.1.1 and later
Information in this document applies to any platform.
***Checked for relevance on 13-Jun-2014***

Symptoms

The application server log contains errors similar to the following, though the error stacks will be application/customer specific and they have been truncated for clarity:

The problem is persistent and the only solution found was to restart the application server instance.

This problem could occur for two reasons:

  1. The connection pool is not sized correctly and there is insufficient capacity to support the number of concurrent client requests.
  2. There is a connection leak, that is application code requests a connection and then, for some reason, does not close the connection to return it to the pool.

This article focuses on the second situation.  The first situation could be addressed by increasing the size of the pool or tuning the SQL / backend database so that connections are not in use as long.  If you are uncertain which situation applies to your installation then enabling connection leak tracing in the JDBC Connection Pool's configuration can reveal more information.  For more details you can refer to the GlassFish Server Administration Guide's section on configuring JDBC Resources, but this screenshot shows the area of the Administration console in question:

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms