Skip to content

Relaycast has no storage-stats endpoint, so capacity questions are unanswerable during an incident #384

Description

@kjgbot

RelayFile can report its own storage; Relaycast cannot. That gap cost most of a day.

What exists

relayfile-cloud exposes GET /v1/workspaces/{id}/admin/storage-stats (added in relayfile-cloud#195), reachable through the relayfile-storage-stats dispatch workflow in cloud. It answered a capacity question in one call:

{"code":"internal_error","message":"Exceeded the maximum database size."}

What does not exist

Relaycast has no equivalent. Verified by code search with a positive control: searching AgentWorkforce/relaycast for sweepStaleAgents returns four files, so the index covers the repo; searching for storage-stats, dbstat, page_count and PRAGMA returns nothing.

Why it matters, concretely

For most of 2026-09-07 Relaycast returned 503 database_overloaded — "The database is temporarily overloaded. Retry after the interval in the Retry-After header." — on writes: node enrolment, agent registration, agent release. Reads succeeded throughout.

Downstream, all of it blocked:

  • the Software Garden's factory container cannot enrol and has been down for hours
  • agent-relay's release failed repeatedly on Smoke jobs that mint an agent
  • relay has ~11 open PRs failing CI for the same reason
  • agent-relay agent remove returns status: dispatched and never applies
  • the agent registry keeps growing (~4,614 rows, ~39 online)

Work was aimed at that error text for hours — bounded retries honouring Retry-After (factory-cloud#135), broker release resilience, a registry prune. All defensible, none confirmed, because nothing could measure whether Relaycast's database was actually near a limit.

The one measurement available pointed at a different service, and reading it as though it applied to Relaycast produced a wrong conclusion that had to be retracted.

Ask

An admin-only, read-only storage endpoint for Relaycast's database, matching RelayFile's shape: total size, per-table sizes, row counts, and whatever the platform exposes about the configured ceiling. Enough to answer "are we near the limit?" without a Cloudflare dashboard login.

Two properties matter more than completeness:

  1. It must work when the database is under pressure, which is the only time anyone will reach for it. An endpoint that fails exactly when the system is unhealthy is not an instrument.
  2. It should distinguish "at capacity" from "busy". The current 503 text conflates them, and that conflation is what sent several people down a retry path when the question was capacity.

Related

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions