Submit a ticketCall us

Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.

 

Home > Success Center > Network Performance Monitor (NPM) > One cause of A query to the SolarWinds Information Service failed when going to a Node Details view

One cause of A query to the SolarWinds Information Service failed when going to a Node Details view

Created by Adrian Cook, last modified by Erin Stenzel on Jun 30, 2016

Views: 220 Votes: 0 Revisions: 11

Overview

The following error appears while browsing the Node details page:

A query to the SolarWinds Information Service failed

The Information Service log should show the similar error when the customer navigates to the Node details page:

2015-10-20 15:27:42,268 [82] ERROR SolarWinds.InformationService.Core.InformationService - Orion_NetPerfMon_Resources_CapacityForecasting_VolumeCapacityForecast.AreDataAvailable()  
Exception caught in method RunQuery
System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Environment

All NPM versions

Cause

The issue is caused by the resource Volume Capacity Forecast on the Node details view. It is related to the detailed data retention period. When it is set to more than the default 7-day period, the resources go through a lot of data and times out. 

Resolution

Remove the visibility of resource if it is unimportant to the customer. 

1. Go to Settings > Manage views, and select Edit the Node Details Summary view.

2. Delete Resource. 

 

If the visibility of resource is important to the customer,  the workaround is to update the query to make it compatible with the customer's retention settings. 

It is advisable to decrease the retention settings, especially for detailed data to avoid performance-related issues caused by the database size and number of devices increasing.

 

1.  Go to the web site folder, the default location is 

C:\inetpub\SolarWinds\Orion\NetPerfMon\Resources\CapacityForecasting.
2. Create a backup of VolumeCapacityForecast.ascx.cs. Copy it to a different directory, for example, your desktop.

3. Open VolumeCapacityForecast.ascx.cs in a text editor. 

4. Find protected bool AreDataAvailable().
5.  Replace it with the following;

 

protected bool AreDataAvailable()
{
if (areDataAvailable.HasValue)
return areDataAvailable.Value;

int nodeId = getNodeId();
if (nodeId != 0)
{
int days = SettingsDAL.GetCurrentInt("ForecastMinDays", 7);
DateTime minDateTime = DateTime.Now.AddDays(-days);

const string query = @"SELECT TOP 1 NodeID FROM Orion.VolumeUsageHistory WHERE NodeID = @nodeId AND DateTime < @minDateTime";

DataTable results;
using (InformationServiceProxy swis = InformationServiceProxy.CreateV3())
{
var queryParams = new Dictionary<string, object>();
queryParams[@"nodeId"] = nodeId;
queryParams[@"minDateTime"] = minDateTime;

results = swis.Query(query, queryParams);
}
areDataAvailable = results != null && results.Rows != null && results.Rows.Count > 0;
return areDataAvailable.Value;
}
areDataAvailable = false;
return areDataAvailable.Value;
}

with:

protected bool AreDataAvailable()
{
if (areDataAvailable.HasValue)
return areDataAvailable.Value;

int nodeId = getNodeId();
if (nodeId != 0)
{
int days = SettingsDAL.GetCurrentInt("ForecastMinDays", 7);
DateTime minDateTime = DateTime.Now.AddDays(-days);

const string query = @"SELECT TOP 1 NodeID FROM Orion.VolumeUsageHistory WHERE NodeID = @nodeId AND DateTime < @minDateTime AND DateTime > @minDateTimeMinusDay";

DataTable results;
using (InformationServiceProxy swis = InformationServiceProxy.CreateV3())
{
var queryParams = new Dictionary<string, object>();
queryParams[@"nodeId"] = nodeId;
queryParams[@"minDateTime"] = minDateTime;
queryParams[@"minDateTimeMinusDay"] = minDateTime.AddDays(-1);

results = swis.Query(query, queryParams);
}
areDataAvailable = results != null && results.Rows != null && results.Rows.Count > 0;
return areDataAvailable.Value;
}
areDataAvailable = false;
return areDataAvailable.Value;
}


6. Save the file.
7. Refresh the page. 


The procedure should optimize the query to perform the operation only on the required amount of data. 

Note: This change will be reverted if you run the Configuration Wizard. 

 

 

Last modified
15:49, 30 Jun 2016

Tags

This page has no custom tags.

Classifications

Public