Skip to main content
← Back to list
01Issue
BugOpenSwamp CLI
AssigneesNone

Relationships

#1617 Workers retry forever on permanent auth failures instead of backing off

Opened by stack72 · 8/12/2026

Description

When a remote worker connects to swamp serve with a token that will never succeed (model definition missing, token revoked, token expired), the worker reconnect loop retries every ~1 second indefinitely. It does not distinguish permanent failures from transient ones.

Impact

  • The worker burns through the per-IP rate limit budget (5 attempts per 60s), blocking all other clients on the same IP (#1615)
  • Server logs fill with repeated auth rejection warnings
  • The worker will never succeed — the token is permanently invalid — but it never stops trying

Observed in production

A worker token platform-fleet-gke-svc had its model definition lost after a pod restart (#1616). The worker retried auth every second, producing "Model not found: platform-fleet-gke-svc" continuously, rate-limiting all other clients on the same cluster IP for the duration.

Proposed Fix

The worker reconnect loop should classify auth failures:

  • Transient (network error, server unavailable, rate-limited) → retry with exponential backoff
  • Permanent (model not found, token revoked, token expired, invalid format) → log the reason, stop retrying, and exit with a clear error message

This requires the server to return structured error information on WebSocket auth rejection — currently it returns a bare HTTP 401 with no body distinguishing "bad token" from "rate-limited" from "token expired". The worker needs the rejection reason to make the right decision.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

8/12/2026, 1:46:23 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.