3

We have a very strange issue on our .Net web application. This application runs on multiple environments without any issue. On a new environment we have installed, when a scheduled recycle is executed for the application, on some occasions we get an error that all pooled connections were in use. The same application exist for load balancing on different machines - only one fails usually. After the failure, we see in the event viewer the application is restarted a few times more - and after 2-3 more failures it succeeds and is started successfully. The error below is about all pool connections are in use - but how can this be right? We have just recycled the application and therefor cleared the pool. What are we missing?

The error is: 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

The error is at line: System.Data.ProviderBase.DbConnectionFactory.TryGetConnection

Thanks

amazingwolf
  • 31
  • 1
  • 6
  • I have same issue, any clue? – CMS Feb 08 '19 at 10:07
  • Not yet. For some time this stopped happening after some IIS and SQL configuration changes - but today this happens again, so we continue investigation – amazingwolf May 14 '19 at 07:20
  • Happened to me only during automatic pool recycles, but not every time. I ended up deactivating automatic recycles (default to 29 hours). Now I don't have the issue anymore. – Éric Bergeron Jan 19 '23 at 15:44

0 Answers0