NET application issues a myIngresConnection.Close() statement, but DBMS monitors see that the connection is not closed until a minute later. Why does the connection stay open?
The physical closing of the connection approximately 60 seconds after the logical closing of the IngresConnection.Close() is correct and normal. The Ingres .NET Data Provider offers connection pooling by default, similar to the ODBC Driver Manager. Delaying the physical closing of the connection by a minute and putting the unused connection into a connection pool allows other sessions in the process with the same connection string to get the inactive connection from the pool and reuse the connection. This greatly improves performance and response time since a physical Open is not needed to satisfy the logical Open. If no other session grabs the physical connection after about a minute of idling in the pool as unused, the connection is physically closed to release system resources on client and servers machines. If the Application Domain is unloading (i.e. the application is shutting down) the connection is physically closed immediately.
Related Questions
- NET application issues a myIngresConnection.Close() statement, but DBMS monitors see that the connection is not closed until a minute later. Why does the connection stay open?
- Where do I drop off my application when Zesto is closed for the season?
- Can dnAnalytics be used in a closed source/proprietary application?