Fly deploy: always resume app after deploy (lifts post-crash suspension)#42
Merged
Conversation
When the app cycles through crash-restart 10 times (e.g., on a bad env var) Fly marks it "Suspended" at the edge layer. A subsequent healthy deploy doesn't lift that flag automatically — the Fly proxy keeps returning 403 with x-deny-reason: host_not_allowed until the app is explicitly resumed. Add an idempotent `fly apps resume` step after Deploy. `|| true` because the command exits 0 when the app is already running but exits non-zero on certain "nothing to resume" responses across flyctl versions; both outcomes are fine.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Fly app
cotrackpro-talkgot into a "Suspended" state during the boot-crash loop earlier today (the workflow hit max-restart-count before we fixed the JSON escaping + TWILIO_ACCOUNT_SID). Now even a healthy deploy doesn't lift that flag — the Fly edge keeps returning:The only way to unsuspend is
fly apps resume. There's no Fly dashboard button for it.Fix
Add an idempotent
fly apps resumestep after Deploy. It runs on every workflow execution; if the app is already running, the command no-ops.|| trueswallows the non-zero exit some flyctl versions return for "nothing to resume."Test plan
curl -i https://cotrackpro-talk.fly.dev/healthreturns 200 with{"status":"ok",...}Generated by Claude Code