Skip to content

ops(fly): add HTTP health check on /health - #17

Merged
future-beat merged 4 commits into
mainfrom
ops/fly-health-check
Oct 23, 2026
Merged

future-beat merged 4 commits into
mainfrom
ops/fly-health-check

Conversation

@future-beat

@future-beat future-beat commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Adds a Fly HTTP service check on /health to fly.toml. Infrastructure only: no code paths change, and the VM size (shared-cpu-1x, 512 MB), region (syd) and scale-to-zero settings stay as they are.

Check settings: GET /health, every 30s, 5s timeout, 10s grace period. The comment in fly.toml explains each value.

Already deployed to production from this branch. Merge it so the next deploy from main keeps the check.

Verified on the live app

  • fly deploy finished cleanly, and the machine shows as healthy.
  • servicecheck-00-http-8080 is passing.
  • /health, /dashboard and /metrics all return 200.
  • The machine auto-stopped about 6.5 minutes after the last request, so the check doesn't keep it awake.
  • The stop event shows oom_killed=false, and the logs contain no OOM lines.

Context

This started as a right-sizing review. Idle memory was about 145 MiB of the 459 MiB usable, about 104 MiB of it the uvicorn process. 512 MB was kept.

A failing Fly check does not restart the machine. It only stops routing traffic to it and fails fly deploy. Crash and OOM recovery comes from the machine's restart policy. This PR also corrects the comment in src/relay/main.py that claimed a failed health check restarts the machine. That change is comment-only.

🤖 Generated with Claude Code

Hesam Abbaszadi and others added 4 commits October 23, 2026 18:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hine

Fly Machines ignore the Dockerfile HEALTHCHECK, and a failing Fly service
check only stops routing and fails deploys; it does not restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@future-beat
future-beat merged commit 0035be5 into main Oct 23, 2026
2 checks passed
@future-beat
future-beat deleted the ops/fly-health-check branch October 23, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant