Blog Post

SQL: The timeout period elapsed prior to obtaining a connection from the pool

Friday, August 19, 2016 3:29 AM

I have experienced this exception and took mi some time to figure out what was wrong.

Details of the exception

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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  

The solution:

We have to update max pool size to allow multiple connections. Be aware that too many pools can lead to decreased performance. We will update our connection string by adding Max Pool Size=200; 

<add name="DefaultContext" providerName="System.Data.SqlClient" connectionString="Data Source=ServerName;Max Pool Size=200;" />

App Pool

A connection pool is created for each unique connection string. When a pool is created, multiple connection objects are created and added to the pool so that the minimum pool size requirement is satisfied. Connections are added to the pool as needed, up to the maximum pool size specified (100 is the default). Connections are released back into the pool when they are closed or disposed.


For more information about pools :



Last posts

12/01/19 - Hybrid Cloud

12/01/19 - Private cloud

12/01/19 - Public Cloud

21/12/18 - Accessing Raspberry PI 3 B

16/10/18 - ICloud installation into Outlook 365 isn't configured to have a default profile