Max Pool Size Error when Trying to View Website
Issue
Your website is generating errors similar to the one below indicating that the maximum pool size has been reached:
An exception of type 'System.InvalidOperationException' occurred in System.Data.dll but was not handled in user code Additional information: 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.
Cause
When you receive this message, it means that your website is using all of its available SQL Database connections (the default limit is 15 connections per DotNetNuke install). On average, a properly executing DotNetNuke website uses only 2-3 SQL connections so a limit of 15 connections per install should be more than enough to allow a website to operate normally. If you are receiving this error, this is generally caused by a bug in a module on your website that is opening connections to the SQL server and not releasing them when complete.
Under some circumstances, this error can also be caused by a website being under extremely heavy processing load or extremely heavy transactional load.
Resolution
If you are in a shared hosting environment, you should update all modules to their latest version in order to ensure you are running the most up-to-date modules. If one of your modules is maxing out your connection pool, the developer may have fixed the problem with an update. When this error occurs, shared hosting customers must contact technical support. If the issue is actively occurring, we may be able to provide information regarding the module causing the error.
If you are on a dedicated server and simply need more SQL connections, you may update the "max pool size" entries in both connection strings by following these instructions:
- Log into your server using Remote Desktop.
- Open My Computer (Windows - E) and go to C:\inetpub\vhosts\[domain]\httpdocs
- Double click on the web.config file. This may just be listed as web if the file structure is set to hide extensions. This will open up Visual Basic or similar editor.
- Find your Connection Strings, these will look similar to the examples below:
- <add name="SiteSqlServer" connectionString="server=(local);database=dbname;uid=dbuser;pwd=dbpassword;pooling=true;connection lifetime=120;max pool size=25;" />
- <add key="SiteSqlServer" value="server=(local);database=dbname;uid=dbuser;pwd=dbpassword;pooling=true;connection lifetime=120;max pool size=25;" />
- Change the max pool size=X value to the required pool size.
- Save and close your web.config file.
When diagnosing MS SQL performance issues, our technicians recommend DataWizard. This tool is available to our dedicated server clients through the SQL Analyzer tool in the Control Suite.
Article ID: 493, Created: April 9, 2012 at 4:45 PM, Modified: August 26, 2014 at 8:59 AM