skip to main content
Using the ADO.NET Client : Using Connection Pooling : Removing Connections from a Pool
 

Removing Connections from a Pool

A connection is removed from a connection pool when it either exceeds its lifetime as determined by the Connection Lifetime connection string option, or when a new connection is initiated by the application (OpenAccessConnection.Open() is called) that has a matching connection string.
Before returning a connection from the connection pool to an application, the Pool Manager checks to see if the connection has been closed at the server. If the connection is no longer valid, the Pool Manager discards it and returns another connection from the pool, if one is available and valid.
Note: By default, if discarding an invalid connection causes the number of connections to drop below the number specified in the Min Pool Size option, a new connection is not created until an application needs one.