Skip to content

Deterministic, unrecoverable connection failures retry forever (55 attempts / 19h on one server) #1145

Closed

Description

@Dumbris

Summary

A server whose failure is deterministic and can never self-heal is retried indefinitely. Observed: 55 failed connection attempts over ~19 hours, retry_count climbing past 26, every one of them a container spawn + failed package install.

Evidence

From ~/Library/Logs/mcpproxy/main.log, one server (gcore-mcp-server, failing per #1143):

first: 2026-08-30T18:53:38+03:00
last:  2026-08-31T13:57:16+03:00
55 × "Connection error" ... "retry_count": 26

Attempts per hour on the final day: 13, 12, 8, 2, 2, 18.

Every attempt produced byte-identical stderr (Git executable not found). The image has no git; it will not grow one. Retrying cannot succeed.

Cost

Each attempt is a full docker run plus a uv install attempt that clones (or tries to). It burns CPU, disk, and network on a guaranteed failure, and it floods main.log — 359 gcore lines in a single log file, which drowns out signal when diagnosing anything else.

Suggested fix

Once an error classifies as permanent, stop retrying (or back off to a very long interval) and surface a terminal state the UI can render, rather than looping forever.

This appears to be the known path where the supervisor reconcile loop bypasses ShouldRetry and re-attempts on a fixed interval regardless of the error's nature — see internal/runtime/supervisor/supervisor.go. The classification work in #1144 is a prerequisite: permanence can only be decided once the error has a code (today it's MCPX_UNKNOWN_UNCLASSIFIED, which is reasonably treated as retryable).

Suggested split:

  • config/toolchain-class errors (missing binary in image, invalid command, unresolvable package spec) → terminal after the first failure, or after a small fixed number of attempts
  • transient errors (daemon down, network, image pull) → keep the existing backoff

Related: #1143, #1144.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/proxykind/bugpriority/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions