Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

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 Eric Bryant on Jul 12, 2017

Views: 742 Votes: 0 Revisions: 12

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
13:35, 12 Jul 2017

Tags

This page has no custom tags.

Classifications

Public