Skip to content

[BUG] Lite alerts re-fire after an app restart — email cooldown is in-memory only #981

Closed

Description

@erikdarlingdata

Split out from #976. The reporter saw the same alerts pop up several times, hours after the originating event.

EmailAlertService deduplicates alert emails with an in-memory ConcurrentDictionary<string, DateTime> (_cooldowns, keyed {serverId}:{metricName}) checked against App.EmailCooldownMinutes. It is never persisted, so an app restart clears every cooldown and an alert that fired recently can immediately fire again.

UI acknowledgements (alert_state.json) do persist, but only clear on a genuinely newer event.

Suggested fix

Persist the cooldown state so it survives restarts. The config_alert_log table already records every alert with alert_time, server_id, metric_name — the cooldown check could read the most recent alert_time for the key instead of relying solely on the in-memory dictionary.

Component

Lite. Reported on 2.10.0.

Activity

  1. added a commit that references this issue on May 22, 2026
  2. erikdarlingdata commented on May 23, 2026

    @erikdarlingdata
    OwnerAuthor

    Fixed in #986 (commit 20696a5) — alert email cooldown is now persisted across restarts, so alerts don't re-fire after the app cycles. Ships in the next release.

  3. added 2 commits that reference this issue on Jun 25, 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