Network Management

Unable to open new database connection all pooled connections were in use and max pool size was reached error in the SolarWinds Platform

This page provides steps on how to resolve the error: The service was unable to open a new database connection when requested. 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 the max pool size was reached.

First published date

10/24/2018 7:12 AM

Last published date

2/19/2025 3:27 PM

Overview

This error may occur throughout the Orion Platform, and the error is below:
 

Error:
Service was unable to open new database connection when requested.

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.

Connection string - Data Source=HOSTNAME.DOMAIN\MSSQL2012;Initial Catalog=SolarNPM;User ID=sql_solarnpm;Password=*******;Connect Timeout=20;Load Balance Timeout=120;Application Name="Solarwinds Trap Receiver Service";Workstation ID=HOSTNAME


The below steps may need to be repeated if you've recently updated your system to a newer version, or re-installed the SolarWinds Platform.

Product section

Orion Platform

Cause

  • Database connections have run out of pooled connections. 
  • The theoretical maximum is 100 connections per process (default Connection Pool limit).

Resolution

The changes are recommended to increase the connection pool size on the Main Poller as it is under load the most.  However, this can also be applied on the Additional Pollers / Additional Web Server if needed.

  1. Stop all Orion Services.
  2. Create a backup of SWNetPerfMon.db, in case you need to roll it back later. The default location is:
    • C:\Program Files (x86)\SolarWinds\Orion\SWNetPerfMon.DB.
  3. Edit the SWNetPerfMon.db file using Notepad or any text editor.
  4. Search for Max Pool Size against Orion DB catalog and change the value to 5000.  The default value is 1000.
  5. Add the following values after the Max Pool Size: Min Pool Size=1;connect timeout=120;Load Balance Timeout=3600

    Note: After you make the changes, the file entries should resemble the example below:

    Example:
    Max Pool Size=5000;Min Pool Size=1;connect timeout=120;Load Balance Timeout=3600
  6. Save the file and exit.
  7. Restart the SolarWinds Platform Services using the SolarWinds Platform Service Manager.
  8.  If you have a High Availability server, you will need to edit the same value on the HA server.

*If you are running SolarWinds Platform 2022.3 or earlier, be aware that the settings in the SWNetPerfMon.db file will be reverted back to the default values after running the Configuration Wizard. The defaults are:

max pool size=1000;connect timeout=20;load balance timeout=120