How to fix Error 3461 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 3461 – “Failed to wait for XTP %ls to complete during recovery”

Why This Error Happens

This error occurs when SQL Server’s In-Memory OLTP (XTP) engine cannot synchronize its recovery threads within the expected timeframe, typically due to corrupted or inconsistent checkpoint files associated with memory-optimized filegroups. It can also be triggered by insufficient system resources (CPU scheduling delays or memory pressure) that prevent XTP worker threads from completing their recovery tasks in time. In some cases, improper shutdowns or storage-level I/O failures leave the memory-optimized data/delta files in a state that the recovery process cannot reconcile.

Step-by-Step Resolution Guide

Step 1: Verify the Health of the Memory-Optimized Filegroup

  • Open SQL Server Management Studio (SSMS) and run sys.database_files to confirm the status of containers tied to the MEMORYOPTIMIZEDDATA filegroup.
  • Check the physical path of the filegroup containers (commonly under C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\DATA\XTP) to ensure the files are not missing, zero-byte, or marked read-only.
  • Look for underlying storage issues using Windows Event Viewer under Windows Logs > System for Disk or NTFS errors.

Step 2: Review SQL Server Error Log for Preceding XTP Events

  • Navigate to C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG.
  • Search for entries referencing “XTP” or “In-Memory OLTP” prior to Error 3461 to identify the specific checkpoint file group causing the stall.
  • Note any associated Error 3414 (recovery failure) that may indicate deeper corruption requiring a restore rather than a repair.

Step 3: Increase Recovery Timeout and Resource Allocation

  • Open SQL Server Configuration Manager and verify that Max Server Memory (configured via sp_configure 'max server memory') leaves sufficient headroom for the XTP memory-optimized data to load fully into RAM.
  • If running on Windows Server 2025, confirm the Hyper-V Dynamic Memory settings (if virtualized) are not throttling the VM during the recovery window.
  • Restart the SQL Server service via services.msc or PowerShell:
  Restart-Service -Name MSSQLSERVER -Force

Step 4: Rebuild or Restore the Memory-Optimized Filegroup

  • If corruption is confirmed via DBCC CHECKDB, take the database offline:
  ALTER DATABASE [YourDB] SET OFFLINE;
  • Restore the database from the last known good backup that predates the XTP corruption, ensuring the backup includes the memory-optimized filegroup.
  • If no clean backup exists, drop and recreate the memory-optimized filegroup and reload data from a non-XTP source table.

Step 5: Apply Latest Cumulative Update for SQL Server 2025

  • Check the installed build number via SELECT @@VERSION; and compare against the latest Cumulative Update (CU) on the Microsoft Update Catalog.
  • Install the latest CU, as XTP recovery threading issues are frequently patched in servicing releases.
  • Reboot the Windows Server 2025 host after installation to ensure all service dependencies reload cleanly.

Alternative or Verification Steps

  • After applying fixes, bring the database back online with ALTER DATABASE [YourDB] SET ONLINE; and confirm no Error 3461 reappears in the ERRORLOG during the startup recovery phase.
  • If the issue persists, run DBCC CHECKDB with DATA_PURITY on the affected database and consider exporting memory-optimized table data to disk-based staging tables as a temporary workaround while filegroup corruption is resolved.