Drowning In Technical Debt
C# | ASP.NET | SharePoint | SQL | Architecture | SOA |
Connection Pool timeout expired

A few days ago, we began to receive the following error - 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.

Of course, two days before production release we began to receive the error above.  We could not reproduce under stressed conditions. The error occurred without any recognizable pattern and manual code reviews turned up empty. We opened a support call with MS and discovered the following:

.Net 2.0 introduced a new PerfMon counter – NumberOfReclaimedConnections. The counter indicates the # of connections that have been reclaimed through garbage collection where Close or Dispose was NOT CALLED by the application code.

Other ADO.Net counters - http://msdn2.microsoft.com/en-US/library/ms254503.aspx

We eventually found the code (off shore code that missed a code review).


Posted 11-10-2006 1:06 PM by David Strommer
Filed under:

Comments

Dennis J. Bottjer wrote Avoid Drowning in the Connection Pool
on 11-14-2006 12:43 AM

Perhaps Garbage Collection is spoiling us as developers. The Garbage Collector is kind of like our own maid following us around picking up every mess we create. Anway, .NET does a great job managing many resources for us including things like memory and

David Strommer wrote Performance counter "add" button disabled
on 05-26-2007 3:40 PM

Several months ago I posted about a NumberOfReclaimedConnections performance counter. http://drowningintechnicaldebt

David Strommer wrote Performance counter "add" button disabled
on 05-26-2007 3:40 PM

Several months ago I posted about a NumberOfReclaimedConnections performance counter. drowningintechnicaldebt.com/.../Connection-Pool-timeout-expired.aspx...

Powered by Community Server (Non-Commercial Edition), by Telligent Systems