Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

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?

0
Posted

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?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123