Orphaned machine in "failed" state listed in GraphQL API - invisible to Machines API, cannot destroy

I have an orphaned machine in my app rag-prd that shows up in the GraphQL API but returns 404 from every Machines API endpoint. The
dashboard overview counts it (showing 6 machines), but the machines table only shows 5.

Orphaned machine:

  • Machine ID: d8d1670b2e1648
  • Name: green-sunset-4075
  • State: failed
  • Region: ord
  • Created: 2025-11-04T23:30:58Z
  • Last updated: 2026-01-11T07:53:04Z
  • App: rag-prd

How I confirmed it exists:

The machine appears in the GraphQL API:

query {
app(name: “rag-prd”) {
machines {
totalCount
nodes { id name state }
}
}
}

This returns 6 non-destroyed machines, including d8d1670b2e1648 in failed state.

However, flyctl machines list -a rag-prd returns only 5 machines, and the Machines REST API with include_deleted=true also returns only
5:

curl -H “Authorization: Bearer $TOKEN”
https://api.machines.dev/v1/apps/rag-prd/machines?include_deleted=true”

Returns 5 machines — the failed one is absent

Everything I’ve tried (all failed):
┌────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────┐
│ Approach │ Result │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ flyctl machine destroy d8d1670b2e1648 --force -a rag-prd │ “machine not found” │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ DELETE https://api.machines.dev/v1/apps/rag-prd/machines/d8d1670b2e1648?force=true │ 404 │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ Same with deploy token (fly tokens deploy) │ 404 │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ flyctl machine leases clear d8d1670b2e1648 -a rag-prd │ “machine not found” │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ REST API /stop, /signal, /cordon on the machine │ All 404 │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ Internal API _api.internal:4280 from a running machine via fly machine exec │ 404 │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ GraphQL removeMachine mutation │ “no longer supported” │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ GraphQL killMachine mutation │ “no longer supported” │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ fly scale count app=1 then fly scale count app=5 │ Only affects managed machines, orphan persists │
├────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────┤
│ fly apps restart rag-prd --force-stop │ Only targets running machines │
└────────────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────┘
Impact: The machine is not consuming compute or blocking deployments — it’s a cosmetic dashboard count issue (shows 6 instead of 5).
However, I’d like to clean it up.

Request: Could a Fly.io engineer remove machine d8d1670b2e1648 from the backend for app rag-prd? This appears to be the same known issue
described in several prior threads where machine metadata persists in the central database but the Machines API cannot reach it.

Thanks!

Please don’t fetch machine state from GraphQL, it is unsupported.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.