I've built a .NET application in which I ensure that every connection to the dbase is closed immediately after use. While running the app, the connections in the dbase increase continually until all the pooled connections are used. I then get timeout errors from the app as follows:
Error: Exception of type System.Web.HttpUnhandledException was thrown.
System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
Any ideas on what may be causing this and how to fix it?
Error: Exception of type System.Web.HttpUnhandledException was thrown.
System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
Any ideas on what may be causing this and how to fix it?