ERROR: Max Pool Size was Reached when Trying to View a DotNetNuke Website

Plesk Servers > SQL > MSSQL
 
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:
  1. Log into your server using Remote Desktop.
  2. Open My Computer (Windows - E) and go to C:\inetpub\vhosts\[domain]\httpdocs
  3. 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.
  4. 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;" />
  5. Change the max pool size=X value to the required pool size.
  6. 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.

 

Add Feedback