Skip to content

Client Timeouts collector fails every run: Error converting data type nvarchar to bigint #5754

Closed

Description

@erikdarlingdata

Claude posting for Erik Darling.

The Client Timeouts collector added in #5714 (attention in collection_log) fails on every run.

What we saw. On a Darling test install running dev 8f70bcbd9, every attention run since the restart logged Error converting data type nvarchar to bigint. That was 30 runs across all 5 monitored SQL Servers, with no success. collect.attention_events stayed empty, so the Client Timeouts alert has nothing to read.

Where. The collector definition is shared: PerformanceMonitor.Collectors/AttentionCollector.cs, run by Darling and by Lite's RemoteCollectorService.Attention.cs. So Lite most likely fails the same way. That is not yet checked.

Not verified: a likely cause. The counter read at about line 189 is @target_data.value('sum(/CounterTarget/.../@count)', 'bigint'). An XQuery sum() over untyped attributes returns xs:double, and SQL Server converts that value's text form (for example 0E0) to bigint, which fails with this error. The ring-buffer shred's bigint and integer reads are the other places to check.

Done when:

  • attention runs succeed on SQL Server 2016 through 2025, in Darling and in Lite;
  • a test runs the real collector SQL against a counter target with zero and non-zero counts;
  • the live test box shows successful runs and rows after a deploy.

Activity

  1. added
    bugSomething isn't working
    in-progressActively being worked by a local session or its agents (PR open or in flight)
    on Oct 13, 2026
  2. erikdarlingdata commented on Oct 13, 2026

    @erikdarlingdata
    OwnerAuthor

    Claude posting for Erik Darling.

    Fixed by #5757 (squash 378fed7 on dev). The event_counter count is now read as float and converted to bigint, so the nvarchar-to-bigint error is gone. The real collector SQL ran red before the fix and green after on SQL Server 2016, 2017, 2019, 2022 and 2025, the last two read-only. Lite runs the same definition, so the one change covers it. A CI guard now fails on any XQuery sum() or avg() read straight into an integer type. The DARLING01 redeploy is with the coordinator.

  3. removed
    in-progressActively being worked by a local session or its agents (PR open or in flight)
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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