Skip to content

FinOps Index Analysis times out — sp_IndexCleanup hangs when dashboard login lacks user mapping in target database #915

@AWH-Shane-DBA

Description

@AWH-Shane-DBA

Component

Full Dashboard

Performance Monitor Version

2.9.0

SQL Server Version

Microsoft SQL Server 2019 (RTM-CU32-GDR) (KB5077469) - 15.0.4460.4 (X64) Feb 13 2026 17:00:40 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2022 Datacenter 10.0 (Build 20348: ) (Hypervisor)

Windows Version

Windows Server 2022 Datacenter

Describe the Bug

FinOps
Index Analysis for one Database
Click Run Analysis

After waiting for some time get "Error: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

Image

In PerformanceMonitor log:

[ERROR] Error running index analysis: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Exception: SqlException
Message: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
StackTrace: at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at PerformanceMonitorDashboard.Services.DatabaseService.RunIndexAnalysisAsync(String databaseName, Boolean getAllDatabases)
at PerformanceMonitorDashboard.Services.DatabaseService.RunIndexAnalysisAsync(String databaseName, Boolean getAllDatabases)
at PerformanceMonitorDashboard.Controls.FinOpsContent.RunIndexAnalysis_Click(Object sender, RoutedEventArgs e)

Steps to Reproduce

  1. Open Dashboard
  2. Select FinOps
  3. Select Index Analysis
  4. Add Database I know exists and click Run Analysis

Expected Behavior

Return list of indexes.

Actual Behavior

Error: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Error Messages / Log Output

Error: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

[ERROR] Error running index analysis: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Exception: SqlException
Message: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
StackTrace:    at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
   at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
   at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
   at PerformanceMonitorDashboard.Services.DatabaseService.RunIndexAnalysisAsync(String databaseName, Boolean getAllDatabases)
   at PerformanceMonitorDashboard.Services.DatabaseService.RunIndexAnalysisAsync(String databaseName, Boolean getAllDatabases)
   at PerformanceMonitorDashboard.Controls.FinOpsContent.RunIndexAnalysis_Click(Object sender, RoutedEventArgs e)

Screenshots

Image

Additional Context

Initial Proof of Concept test of the monitor.

If I put in a database name that does not exist, it correctly reports this as an error:

[ERROR] Error running index analysis: No valid databases found to process.
Exception: SqlException
Message: No valid databases found to process.
StackTrace: at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.Connection.SqlConnectionInternal.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at PerformanceMonitorDashboard.Services.DatabaseService.RunIndexAnalysisAsync(String databaseName, Boolean getAllDatabases)
at PerformanceMonitorDashboard.Services.DatabaseService.RunIndexAnalysisAsync(String databaseName, Boolean getAllDatabases)
at PerformanceMonitorDashboard.Controls.FinOpsContent.RunIndexAnalysis_Click(Object sender, RoutedEventArgs e)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions