HydraIssues

HydraBrain: 3-minute readiness deadline is shorter than a cold-cache runtime start, so the supervisor kills and relaunches until the JIT cache is warm
open unclassified Project: hydra-experiencenet Parent: #659 Reporter: 14 Oct 2026 20:44

Description

internal/agent/controller.go:198 waits for http://127.0.0.1:<local_port>/health with a fixed 3 minute deadline. On timeout it calls fail() then shutdown(), killing the runtime, and the next reconcile tick starts a fresh one.

A runtime whose cold start exceeds 3 minutes therefore never gets to report healthy. It is killed and relaunched instead.

Observed on cosmic-pretzel-98 (node-4c2be4b0), 2026-10-14, EXL3 vLLM workload

Three launches were needed to come up, each cut off at just over 3 minutes:

  • launch 1: started 20:30:35 UTC, weights loaded 20:31:30, killed about 20:33:40 (185s)
  • launch 2: started 20:33:40, killed about 20:36:54 (194s)
  • launch 3: started 20:36:54, engine init took 23.4s, Application startup complete, entered discovery 20:39:15

The third attempt succeeded only because the first two populated the JIT and compile caches, so warm-up finally fitted inside the window. The restart loop self-resolved by accident, not by design.

Why this matters

  • It is luck-dependent. If a cold start stays above 3 minutes even with a warm cache (bigger model, slower disk, busier GPU), the supervisor loops indefinitely and the workload never becomes available.
  • It is reachable again on this host. The named Docker volume hydrabrain-exl3-cache is what keeps restarts fast; prune or recreate it, or move to a host without it, and the loop returns.
  • Each killed attempt leaves a full model load of wasted GPU and disk work, and the restarts are invisible unless the runtime log is read, since the only external symptom is a slow start.

Suggested direction

Make the readiness deadline a property of the desired document rather than a hard-coded constant, so a slow-starting runtime can declare a longer first-start budget. Treating the first start after an artifact or image change differently from a steady-state restart would also help. Separately, a killed-during-startup event is worth reporting up to HydraCluster, so a relaunch loop is visible in the fleet view instead of only in logs.

Found while completing the cosmic EXL3 deployment in #779.

Session Context

Venue
cloud-seven