Applications Systems

SAM WMI Polling Fails with System.OutOfMemoryException in ManagementDataFetcher

SAM component monitors using WMI-based polling may intermittently fail with a System.OutOfMemoryException in the ManagementDataFetcher, causing affected components to report errors or go Unknown. This article covers the common causes and recommended steps to resolve the issue.

First published date

5/21/2026 6:12 PM

Last published date

5/21/2026 6:12 PM

Overview

Server & Application Monitor (SAM) component monitors that use WMI-based polling may intermittently fail with an OutOfMemoryException. This causes affected components to report errors or go Unknown in the SolarWinds web console.

Symptom

The following error appears in the APM Probes log (C:\ProgramData\SolarWinds\Logs\APM\):

ERROR SolarWinds.APM.Probes.Management.ManagementDataFetcher - Fetching WMI query failed by 'SolarWinds.APM.Probes.Management.Wmi.WmiConnection'.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

In some cases, the following variant may also appear, indicating the WMI helper class failed to initialize entirely:

ERROR SolarWinds.APM.Probes.Management.ManagementDataFetcher - Fetching WMI query failed by 'SolarWinds.APM.Probes.Management.Wmi.WmiConnection'.
System.TypeInitializationException: The type initializer for 'SolarWinds.APM.Probes.Management.Wmi.WMIHelper' threw an exception.
---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Affected component monitors will show as Unknown or Error in the web console.

Product section

Server Application Monitor

Cause

Cause

WMI is known to have intermittent issues during polling. SAM relies on WMI to query management data from monitored nodes. When this error is thrown, one or more of the following conditions are typically responsible:

  • WMI quota exceeded on the monitored host — The WMIPRVSE.EXE process (WMI Provider Host) on the target node has exceeded its configured memory quota before it could return query results.

  • Excessively large WMI query result set — Queries such as file enumeration (CIM_DataFile) or security event log queries (Win32_NTLogEvent) without sufficiently tight filters can return very large datasets that exhaust available memory.

  • Polling engine memory pressure — When a large number of WMI-polled nodes are assigned to a single polling engine, the engine's worker process may run out of memory while buffering multiple concurrent WMI responses.

  • Corrupted WMI performance counters — Corrupted WMI or PerfMon classes on the monitored host can cause runaway queries that consume memory unexpectedly.

Resolution

Resolution

Apply the following steps in order. Test after each stage to determine if the issue is resolved.

Stage 1: Adjust SAM Application Monitor Settings

  1. In the SolarWinds web console, navigate to the affected Application Monitor.

  2. Edit the Application Monitor and toggle the Polling Platform setting from x86 to x64, or vice versa.

  3. At the individual component level, change the fetching method from WMI to RPC if the monitor type supports it.

Stage 2: Increase WMI Memory Quotas on the Monitored Host

Perform the following on both the monitored host (target node) and the SolarWinds polling engine:

  1. Open Run (Win + R) and type wbemtest, then click OK.

  2. Click Connect and enter the namespace: root\default

  3. Click Enum Instances and search for __ProviderHostQuotaConfiguration.

  4. Open the instance and increase the following values:

    • MemoryPerHost — default is 512 MB; increase to 768 MB or higher.

    • MemoryAllHosts — default is 1024 MB; increase proportionally.

  5. Save changes and close wbemtest.

Stage 3: Restart WMI Service on the Monitored Host

  1. On the target node, open services.msc.

  2. Locate Windows Management Instrumentation.

  3. Right-click and select Restart.

  4. Allow a few minutes for the service to fully reinitialize, then check if polling resumes.

Stage 4: Rebuild WMI Performance Counters

If the issue persists, the WMI or PerfMon classes may be corrupted. Run the following commands on the target node as Administrator:

cd %windir%\system32\
lodctr /R
cd %windir%\SysWOW64\
lodctr /R
winmgmt /resyncperf
wmiadap.exe /f

NOTE: lodctr /R may need to be run twice if it fails on the first attempt.

After running the commands, restart the Windows Management Instrumentation service from services.msc.

Stage 5: Redistribute WMI Node Load (Polling Engine)

If multiple nodes share the same polling engine and all exhibit WMI failures:

  1. In the SolarWinds web console, go to Settings > Polling Engines.

  2. Review the number of WMI-polled nodes assigned per engine.

  3. Move some WMI-polled nodes to a different polling engine to reduce memory pressure.

Verification

After applying the steps above:

  1. Enable debug logging for the affected application(s) in SAM.

  2. Monitor the APM Probes log (C:\ProgramData\SolarWinds\Logs\APM\) for recurrence of the OutOfMemoryException error.

  3. Confirm the affected component monitors return to an Up/Warning state in the web console.