Skip to content

Lite and Darling log a Warning on every cycle while the long-query session cannot be created #4964

Closed

Description

@erikdarlingdata

Problem

Sometimes the long-query trace is on but its Extended Events session cannot be created. Both apps then try again on every cycle and log a Warning each time. Nothing caps it.

  • Darling logs one or two Warnings per sweep: the session reconcile and the worker can each log one. Two known cases reach this. A registration for an Azure SQL Database logical server whose login cannot read master is one. A server where every CREATE is refused is the other.
  • Lite logs one Warning per collection cycle, because it creates the session on every cycle.

At one cycle a minute, that is 1,440 to 2,880 Warnings a day for one server, all saying the same thing.

The drop side already has a cap (#4944). After 5 failed passes it logs one Warning, then tries once an hour at Debug.

Why the retry stays

Trying the create again on every cycle is right. Each attempt records the fault again, so collection health shows SESSION_MISSING. Only the log level of the repeats changes.

Fix direction

Log the first failure at Warning. Log repeats of the same failure at Debug until a create succeeds or the server reconnects. Keep recording the fault on every attempt. Do the same in both apps.

Where it happens

  • Darling: DarlingXeSessions.cs, where the enable-side listing failure is thrown again, and the worker's general catch around the long-query reconcile in DarlingWorker.cs.
  • Lite: the per-cycle create in RemoteCollectorService.LongQueryCompletions.cs.

Found while fixing #4944.

Activity

  1. added 18 commits that reference this issue on Oct 2, 2026
  2. erikdarlingdata commented on Oct 3, 2026

    @erikdarlingdata
    OwnerAuthor

    Fixed by #4967, now on dev.

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