Skip to content

Fix Fly.io bluegreen deploy config#35

Merged
AquiGorka merged 1 commit intodevfrom
fix/fly-deploy-config
Mar 17, 2026
Merged

Fix Fly.io bluegreen deploy config#35
AquiGorka merged 1 commit intodevfrom
fix/fly-deploy-config

Conversation

@AquiGorka
Copy link

Summary

  • Sets min_machines_running = 2 — both ams and gru machines must stay running, preventing auto-stop from killing gru before health checks pass during bluegreen deploy
  • Increases health check grace_period from 15s to 60s to accommodate cross-region cold starts (gru connects to DB in ams)

Context

Bluegreen deploys were failing because:

  1. min_machines_running = 1 allowed Fly to auto-stop the gru machine immediately after creation (ams already satisfied the minimum)
  2. The 15s grace period wasn't enough for gru to cold-start and pass health checks

Test plan

  • fly deploy completes successfully with bluegreen strategy
  • Both ams and gru machines healthy after deploy

- min_machines_running=1 caused the gru machine to auto-stop before
  passing health checks during bluegreen deploy, failing the rollout
- grace_period increased from 15s to 60s to accommodate cross-region
  cold starts (gru connects to DB in ams)
@AquiGorka AquiGorka merged commit 1812047 into dev Mar 17, 2026
2 checks passed
@AquiGorka AquiGorka deleted the fix/fly-deploy-config branch March 17, 2026 12:55
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