We have a system that uses an Oracle database. I've been asked if the system makes use of connection pooling which I'm not sure about.
We are using the Oracle.DataAccess.Client.OracleConnection
When reading up on the subject I've found that connection pooling is set to true in the connection string and that it is set to true by default.
Our connection string does not include any pooling settings. Does this imply that we are using pooling and if so what would the default min and max pool size be? I've not been able to find any information on what these values would be in the case of using connection pooling implicitly (i.e. not specified in the connection string).
Connection pooling in the JDBC 2.0 extension API is a framework for caching database connections. This allows reuse of physical connections and reduced overhead for your application. Connection pooling functionality minimizes expensive operations in the creation and closing of sessions.
Connection pooling means that connections are reused rather than created each time a connection is requested. To facilitate connection reuse, a memory cache of database connections, called a connection pool, is maintained by a connection pooling module as a layer on top of any standard JDBC driver product.
The application is leaving connections open. This is using up all the available connections and so connections are randomly being refused. The easiest code solution for this is to make sure the application closes the connections as quickly as possible (rather than waiting for variables to leave scope).
Connection pooling is turned on by default as specified in the official ODP.NET documentation on Connection String Attributes (default: Pooling = true
).
So, if your connection string omits any kind of connection pool setting, you will get a connection pool with the following basic default settings, again based on that same official ODP.NET documentation page on Connection String Attributes:
Connection Timeout = 15
: Maximum time (in seconds) to wait for a free connection from the pool.Decr Pool Size = 1
: Number of connections that are closed when an excessive amount of established connections are unused.Incr Pool Size = 5
: Number of new connections to be created when all connections in the pool are in use.Max Pool Size = 100
: Maximum number of connections in a pool.Min Pool Size = 1
: Minimum number of connections in a pool.The documentation mentions other interesting default pool values as well that you may want to read about as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With