How to troubleshoot slow or timed-out Windows Monitor data collection

How to troubleshoot slow or timed-out Windows Monitor data collection

Applications Manager uses VBScript to connect to remote Windows servers and collect telemetry data through WMI. By default, each data collection script has a timeout of 180 or 300 seconds (3 or 5 minutes).

This error occurs when the script execution exceeds the configured timeout before completing data collection.


Possible Causes

The script timeout error can be triggered by one or more of the following conditions:

CategoryPossible Causes
NetworkHigh latency between the Applications Manager server and the target server
Server PerformanceThe target server is busy or experiencing high resource utilization
WMISlow WMI query execution on the target server
Infrastructure ChangesRecent firewall, antivirus, or network policy changes affecting WMI communication
Performance CountersCorrupted Windows performance counters
WMI CorruptionCorrupted WMI classes or WMI repository

Troubleshooting Steps

Step 1: Verify Script Execution Time

Before applying any fixes, measure the actual script execution time to determine whether the timeout is legitimate.

Using the Self Help Tool

📖 Reference: See the existing using the Self Help Tool KB article for detailed instructions.

While executing the Self Help Tool:

  1. Increase the Timeout value to allow sufficient time for script execution.
  2. Select the required metric(s) or All Metrics for validation.
  3. Click Execute to run the script.
  4. Review the generated report and note the overall script execution time.

Execute the Script from the Applications Manager Server

  1. Open Command Prompt as an administrator.
  2. Navigate to the following directory:
Info
<APM_HOME>\working\conf\application\scripts
  1. Execute the following commands:
Quote
set start=%time%
cscript windowsScripts.vbs "hostname" "username" "password" "memory.vbs,cpucore.vbs,cpu.vbs,disk.vbs,NetworkInterface.vbs,uptime.vbs,PhyMemCpuImportProduct.vbs,services.vbs"
set end=%time%
echo %start%
echo %end%
NotesNote:
  • Replace hostname, username, and password with the values configured for the Windows monitor.
  • If the script execution time is close to or exceeds the configured timeout, proceed with the following troubleshooting steps.

Step 2: Increase the Script Timeout (Immediate Workaround)

If the monitored server is expected to respond slowly, increase the script timeout to allow data collection to complete. To do so, follow the steps below:

  1. Navigate to Windows Monitor → Edit Monitor.
  2. Increase the Timeout value by 300 seconds.
  3. Save the changes.
  4. Poll the monitor again and verify whether data collection succeeds.

NotesNote: Increasing the timeout is only a temporary workaround. Configuring a significantly higher timeout may increase the overall data collection time and should be done only when necessary.


Step 3: Verify Network Connectivity

If increasing the timeout resolves the issue, the delay is likely caused by network latency or slow WMI communication.

Test a Remote WMI Query

  1. Open WBEMTest on the Applications Manager server.
  2. Press Win + R, type wbemtest, and press Enter.
  3. Click Connect.
  4. Connect to:
Info
\\<TargetServer>\root\cimv2
  1. Authenticate using the monitoring credentials.
  2. Click Query and execute:
QuoteSELECT * FROM Win32_ComputerSystem
  1. Observe the query execution time.

NotesNote: The above example uses the Win32_ComputerSystem query to validate remote WMI connectivity. Applications Manager collects multiple metrics using different WMI classes and queries. To test the WMI query for a specific metric, refer to the Namespace & WMI Class KB article and execute the corresponding WQL query.

If the remote query is slow, investigate the following:

  • Network latency
  • Firewall changes
  • Antivirus policies
  • VPN/NAT devices
  • Receive Side Scaling (RSS)
  • TCP Chimney Offload settings

Resolve any network-related issues before proceeding further.


Step 4: Verify the WMI Components

If the network is healthy but WMI queries remain slow even when executed locally on the target server, the issue may be related to corrupted Windows performance counters or WMI classes.

Test the WMI Query Locally on the Target Server

  1. Log in to the target server using the monitoring account.
  2. Open WBEMTest.
  3. Press Win + R, type wbemtest, and press Enter.
  4. Click Connect.
  5. Enter the following namespace:
Quote
root\cimv2
  1. Click Connect. Authentication is generally not required for a local connection.
  2. Click Query and execute:
QuoteSELECT * FROM Win32_ComputerSystem
  1. Observe the query execution time.

NotesNote: The above example uses the Win32_ComputerSystem query to validate WMI connectivity. Applications Manager collects multiple metrics using different WMI classes and queries. To test the WMI query for a specific metric, refer to the Namespace & WMI Class KB article and execute the corresponding WQL query.

If the query executes slowly or fails, proceed with the following resolution steps.


4.1 Rebuild Windows Performance Counters

Corrupted Windows performance counters commonly affect PerfMon-related WMI classes and may significantly increase WMI query execution time.

Resolution

  1. Open Command Prompt as an administrator on the target server.
  2. Run the following command:
Quote
lodctr /r
  1. Restart the server after rebuilding the performance counters.
  2. Re-test the WMI query to verify whether the issue has been resolved.

4.2 Reconstruct the WMI Classes

If rebuilding the performance counters does not resolve the issue, reconstruct the WMI classes by following the steps provided in the following KB article:

For additional information, refer to the following Microsoft article:


Contact Support

If the issue persists after completing the above troubleshooting steps, collect and share the following information with Applications Manager Support:

  • A screenshot of the error displayed in the Windows monitor.
  • A screenshot of the Edit Monitor page showing the configured timeout.
  • The output generated by the Self Help Tool and the manual script execution.
  • A Support Information File (SIF) generated immediately after reproducing the issue.

                    New to ADSelfService Plus?

                      • Related Articles

                      • Windows Monitoring - FAQ

                        This Knowledge Base article provides answers to frequently asked questions related to Windows Server monitoring through WMI. The articles are categorized based on the monitoring lifecycle to help you quickly identify the relevant troubleshooting ...
                      • DNS Monitor - Troubleshooting

                        Common DNS Monitor Errors and Troubleshooting Guide 1. Host Not Found Description: The DNS server was unable to locate the requested lookup address. Possible Causes: This may happen if the hostname is incorrect, the domain does not exist, or there is ...
                      • Real User Monitor (RUM) - Troubleshooting guide

                        If your Real User Monitor has not collected data for an extended period, follow the steps below to troubleshoot the issue. Step 1: Verify the RUM Agent configuration Real User Monitoring requires the RUM Agent to be installed and mapped to ...
                      • Data Collection: Troubleshoot data collection issues in Exchange Server monitor

                        Prerequisites: Ensure that you have met all the prerequisites for the Exchange Server monitor. Refer to the below error scenarios and refer to the respective troubleshooting steps. No data collected for few metrics or all the metrics in Exchange ...
                      • How to clear "Query Execution Timed Out" (or) "Socket Read Timed Out" error alerts during Oracle monitor data collection?

                        Applications Manager throws the Query timed out/Socket read timed out error in some scenarios as below: Socket read timed out due to this query group(s) : xxxxxxxx Error Message : java.sql.SQLRecoverableException: IO Error: Socket read timed out. ...