From 1f9cc5e58eb668d0aca0a4d4b9ef008ad393f318 Mon Sep 17 00:00:00 2001 From: "Alessandro (Ale) Segala" <43508+ItalyPaleAle@users.noreply.github.com> Date: Thu, 6 Aug 2026 11:16:48 -0700 Subject: [PATCH] fix: in non-HA mode, increase AlarmLeaseDuration (#1660) --- backend/internal/bootstrap/actors_bootstrap.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/internal/bootstrap/actors_bootstrap.go b/backend/internal/bootstrap/actors_bootstrap.go index b9b8d116..d4882930 100644 --- a/backend/internal/bootstrap/actors_bootstrap.go +++ b/backend/internal/bootstrap/actors_bootstrap.go @@ -63,11 +63,13 @@ func NewActors(o NewActorsOpts) (*local.Host, map[string]*ratelimit.RateLimitSer } // With a single active host the relaxed alarm intervals reduce database load - // When HA is enabled they are dropped so Francis uses its tighter defaults, which distribute alarm work and fail over faster across multiple hosts + // The longer lease duration also means fewer lease renewals, since Francis renews a lease 10s before it expires (no other host can claim the alarm anyways) + // When HA is enabled these are dropped so Francis uses its tighter defaults, which distribute alarm work and fail over faster across multiple hosts if !o.EnvConfig.HAEnabled { opts = append(opts, local.WithAlarmsPollInterval(5*time.Minute), local.WithAlarmsFetchAheadInterval(5*time.Minute), + local.WithAlarmsLeaseDuration(180*time.Second), ) }