Running on Fly.io?

Fly.io machines looping or deploys refusing? We unstick it.

A lot of the Fly apps we see came off Heroku in a rush, then sat on default machine sizes with half the regions left running after someone tested latency. We walk the fly.toml, the machine states and the volume layout until the real cause is on the screen, and we trim the bill on the way out.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

fly-deploy.log

still broken

What it is

Fly.io at a glance

Fly.io runs user code as Firecracker micro-VMs, which it calls Machines, on a network of edge regions. You push a Docker image or a Dockerfile, and the platform boots instances close to your users with public Anycast addresses and private WireGuard networking out of the box.

The company is based in Chicago and shipped its first public release in 2020, growing quickly as teams leaving Heroku looked for something with a similar developer story. It handles Postgres clusters, Redis via Upstash, persistent volumes and multi-region deploys, and the whole workflow is driven by a single CLI called flyctl.

Type
Micro-VM application platform on edge regions
First released
2020
License
Proprietary SaaS, usage-based
Maintained by
Fly.io, Inc.
Typically used for
Web apps, APIs, Postgres clusters, background workers, latency-sensitive services close to users

The honest version

Fly.io pros and cons

No technology is all upside. This is where Fly.io earns its place and where it tends to cause trouble.

Where Fly.io is strong

  • Deploys feel familiar to Heroku refugeesfly launch inspects the project, writes a fly.toml, builds an image, and ships it. Teams that loved git push heroku master tend to settle in quickly.
  • Real regions, not just an edge cacheThe code itself runs in 30-plus regions. A Postgres replica next to the user, a web machine in the same city, latency that a CDN alone cannot match.
  • WireGuard private networking by defaultEvery app gets a 6PN mesh so internal services can talk over private IPv6 without a VPC to set up first.
  • Decent primitives for background workMachines can be started, stopped and resized from the API, so a worker fleet can scale to zero on its own schedule rather than idling.
  • Volumes and Postgres bundled inPersistent block storage and a managed Postgres offering remove two of the first pieces most teams would otherwise bolt on.
  • Transparent pricing when you stay inside the linesPer-second billing on CPU, RAM and bandwidth, with a public price list. Costs are legible if you keep the machine sizes honest.

Where Fly.io bites

  • Postgres is mostly on youFly Postgres is a template around standard Postgres and repmgr rather than a fully managed service. Backups, failovers and version upgrades still need human attention.
  • Status history is bumpyPlatform incidents, networking blips and capacity events have shown up more often than a customer running production would like, and you cannot route around them.
  • Machines can get stuckA health check that flaps, a release command that times out, or a stopped machine that will not stop can sit in an uncertain state until flyctl is coaxed to clean it up.
  • Regions are easy to accumulatefly scale regions reads as cheap and the invoice says otherwise. Six copies of the app on standby in six places add up quickly.
  • Observability is bring-your-ownLogs stream through Grafana, metrics into a shared Prometheus, and anything beyond that means wiring up Sentry, Datadog or similar yourself.
  • Smaller ecosystem than the big threeGuides, Terraform providers and third-party tools exist but are not as deep as the AWS or GCP catalogues, so unusual needs tend to mean solving things yourself.

Sound familiar?

Common Fly.io problems we fix

The Fly.io problems that bring people to us, and what you have once each one is fixed.

the app is not listening on the expected address

Smoke tests fail on every release

The container binds to 127.0.0.1 or to the wrong port, so fly-proxy cannot reach it, the smoke check times out, and the deploy rolls back without a useful clue in the output.

App bound to 0.0.0.0 and serving

release command failed, deployment aborted

The release command keeps failing

A database migration that needs more memory than the release VM has, or an environment variable that lives in the app and not in the release step, leaving the deploy stuck on step one.

Migrations run, deploy continues

OOMKilled: exceeded memory limit

Machines die on memory pressure

A Rails or Node app sized for a Heroku performance dyno and running on a shared-cpu-1x on Fly, hitting the RAM ceiling as traffic warms up.

Right-sized Machines, memory watched

monthly bill: $980, apps: 3

The bill jumped after the Heroku migration

Standby regions nobody is actually using, a Postgres cluster larger than it needs to be, and a worker set to always-on when it could be scale-to-zero.

Costs reviewed region by region

machines failed health check after 2 attempts

Rolling deploys get stuck halfway

The new Machine never passes its health check, the old one is already drained, and traffic is served by whichever instance happens to still be up.

Health checks honest, deploys green

Volume is in a different region than the machine

A volume ends up stranded in another city

A machine recreated in a new region without the volume attached, or a scale operation that spread Machines across regions where the disk does not exist.

Storage and compute co-located

could not find a deployable Docker image

fly deploy cannot find a builder

A Dockerfile removed from the repository, a buildpack section that was never filled in, or a remote builder that failed to start and left nothing behind.

Build pipeline reproducible

inherited from a contractor

Nobody left on the team knows the setup

A Fly org still registered to a developer who has moved on, with secrets set from a laptop that is no longer in the building and a fly.toml nobody has read.

Ownership moved, config written down

What we do

Fly.io help, from rescue to steady state

Ring us for one stuck deploy, or hand us the org and let us tidy the lot.

Rescue
Deploys failing, Machines looping or traffic missing a region. We restore service first and then write down what we found.
Heroku and Render migrations
Moving a working app off another PaaS onto Fly with Postgres mirrored, workers tested, and a quiet DNS cutover.
Machine right-sizing
CPU and RAM reviewed per workload, region fan-out trimmed to what users actually need, invoice before and after.
Postgres on Fly
Primary and replica topology, backups to object storage you own, and failover rehearsed on a copy before anything is tested in anger.
Multi-region deploys
Read replicas, request routing and data locality worked out so the code benefits from the regions you are paying for.
Managed Tech
A monthly check on Machine utilisation, Postgres health and the fly.toml, with a human reachable when deploys misbehave after hours.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Fly.io alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Fly.io questions

Something else? Call+1 737 727 7327

How do we move from Heroku to Fly.io without downtime?

We stand the app up on Fly in parallel, replicate the Postgres database with logical replication or a pg_dump restore window, and cut traffic over at the DNS layer during a quiet hour. Heroku stays running until the new side has been proven for at least a day, and workers are moved last so queues do not split across two platforms.

Why does fly deploy say the app is not listening on the expected address?

The container is almost certainly bound to localhost or to a port that does not match internal_port in fly.toml. Bind to 0.0.0.0 on the port Fly expects, confirm the health check path returns a 200, and the smoke test will pass. We see this one on roughly half the Heroku migrations we handle.

Is Fly Postgres actually managed?

Not in the way RDS is. Fly Postgres is a template that installs standard Postgres with repmgr on Machines in your organisation. The daily operations, backups, failover testing and version upgrades still need somebody competent paying attention, and we do that for clients who prefer not to.

Our Machines keep getting OOMKilled, what should we do?

First confirm the actual resident memory of the process under load, since the app is often sized for a Heroku performance tier with four times as much RAM. Either move to a Machine with more memory, reduce worker concurrency, or address the underlying leak. We take a profile before changing sizes so the fix is pointed at the cause.

Should we pick Fly.io, Render or Railway?

Render is the gentlest replacement if Heroku's feel is what you liked, Railway is the easiest for small side projects, and Fly wins when latency matters and you want code running close to users in several regions. We will give you a straight recommendation for your workload before any work is quoted.

How much does Fly.io help cost?

The estimate is on us. Tell us which apps are on Fly and the symptoms you are seeing, and we come back with a scope and a number before any changes are pushed.

Free estimate

Fly.io giving you grief?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.