Skip to content

Fix XE ring buffer query timeouts on large buffers#38

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/23-xe-ring-buffer-timeout
Feb 15, 2026
Merged

Fix XE ring buffer query timeouts on large buffers#38
erikdarlingdata merged 1 commit intodevfrom
feature/23-xe-ring-buffer-timeout

Conversation

@erikdarlingdata
Copy link
Owner

Summary

Fixes #37 — XE ring buffer queries for deadlock and blocked process collection timeout when the buffer is large (4MB+ during sustained load testing).

  • Materialize ring buffer XML into a table variable before shredding with CROSS APPLY .nodes()
  • Applied to all 4 XE queries (deadlock + blocked process, on-prem + Azure SQL DB)
  • ~350x performance improvement (2:44 → 0.46s)

Test plan

  • dotnet build Lite/PerformanceMonitorLite.csproj -c Debug — builds clean
  • Run Lite against SQL2022 with HammerDB load — deadlock/blocking collectors should complete without timeout
  • Verify deadlock and blocked process data appears in trends and grids

🤖 Generated with Claude Code

Materialize the ring buffer XML into a table variable before shredding
with CROSS APPLY .nodes(). The inline subquery pattern forced SQL Server
to repeatedly parse the full 4MB+ XML blob, causing 2+ minute execution
times and 30-second CommandTimeout failures during sustained load.

Applied to all 4 XE ring buffer queries:
- Deadlock collection (on-prem + Azure SQL DB)
- Blocked process report collection (on-prem + Azure SQL DB)

Performance: ~2:44 → ~0.46s (~350x improvement).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 7506cb6 into dev Feb 15, 2026
1 check passed
@erikdarlingdata erikdarlingdata deleted the feature/23-xe-ring-buffer-timeout branch February 20, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant