You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-host booking fails with 503 "calendar availability could not be checked" when hosts' calendars are slow #178
I've searched existing issues and this isn't a duplicate.
This is a reproducible bug in Calnode — not a configuration/setup question or a feature request.
What's the bug?
calendarFreeHosts (internal/handler/booking_calendar_check.go) re-checks each host's external free/busy one after another, all under a single 15s deadline. Inside one host, calendar.Service.FreeBusy also queries Google, Microsoft and CalDAV in sequence. With a collective of a few hosts on Microsoft Graph (several seconds each with a token refresh), the deadline runs out and POST /v1/bookings returns 503 "calendar availability could not be checked; please try again shortly", even though every host is free. If the deadline expires during the DB read instead, the booker gets 500 "could not complete the booking".
Separately, any single provider error fails the whole booking. That includes optional hosts, and round-robin candidates when other verified-free candidates exist. One member's revoked token blocks every booking for the team.
Steps to reproduce
Collective event type with 3 required hosts, each with a connected calendar whose free/busy takes about 6s (e.g. Graph with a cold token).
POST /v1/bookings for a free slot → 503 after about 15s.
All six of these are fixed and merged. Thanks — this batch was unusually well diagnosed, with file, function and mechanism in every report, which cut the work down to verifying rather than investigating.
Each was verified against the old code first: your failing case reproduced, then passed. Tests came with the fixes, so they stay fixed.
One note on #178: fail-closed is kept where attendance is mandatory. A required host we cannot read still fails the booking, because booking a seat without checking risks a double-booking. Only round-robin candidates and optional hosts are dropped. That is a deliberate line, not an oversight, in case you disagree with where it sits.
Activity
pullfrog commentedon Oct 28, 2026
shockalotti commentedon Oct 29, 2026
All six of these are fixed and merged. Thanks — this batch was unusually well diagnosed, with file, function and mechanism in every report, which cut the work down to verifying rather than investigating.
Landed:
ON CONFLICTnow repeats the partial index'sWHERE, and a running job is left aloneEach was verified against the old code first: your failing case reproduced, then passed. Tests came with the fixes, so they stay fixed.
One note on #178: fail-closed is kept where attendance is mandatory. A required host we cannot read still fails the booking, because booking a seat without checking risks a double-booking. Only round-robin candidates and optional hosts are dropped. That is a deliberate line, not an oversight, in case you disagree with where it sits.