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).