When there is an increase in the number of requests made to the server, some connections get a timeout error and are not processed.
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.
DNN - All versions
The maximum number of connections configured in the server is reached, causing rejection to all new connections. This limit is usually reached due to a high number of intensive queries with a long completion time.
Note: The default number of connections configured on the server is 100.
- Confirm that you are having a connection pool timeout issue by searching for the error described in the issue section in the following log file:
- If the error was found, open the web.config file located in the website root folder.
- Add the parameter Max Pool Size=XXX in the connection string, replacing XXX for your desired value.
Your connection string should look like this if XXX= 200.
<add name="SiteSqlServer" connectionString="Data Source=localhost;Initial Catalog=dbname;User ID=dbuser;Password=dbpassword;Max Pool Size=200" providerName="System.Data.SqlClient" />
- Monitor the system logs mentioned in step 1 to confirm that the error is no longer appearing after the change.