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