Network Management
One cause of A query to the SolarWinds Information Service failed when going to a Node Details view
The following error appears while browsing the Node details page: A query to the SolarWinds Information Service failed
First published date
Last published date
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.
Product section
Cause
Resolution
Remove the visibility of resource if it is unimportant to the customer.
- Go to Settings > Manage views, and select Edit the Node Details Summary view.
- 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.
- Go to the web site folder, the default location is
- C:\inetpub\SolarWinds\Orion\NetPerfMon\Resources\CapacityForecasting.
- Create a backup of VolumeCapacityForecast.ascx.cs. Copy it to a different directory, for example, your desktop.
- Open VolumeCapacityForecast.ascx.cs in a text editor.
- Find protected bool AreDataAvailable().
- 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;
}
- Save the file.
- 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.