App: postgres-hose-2025, region sin. Primary machine e825411f01e998, replica e82de15a213148 stayed healthy throughout.
Primary’s pg/role checks flapped 0/3→3/3 in a loop for a while. Logs showed sorry, too many clients already and repmgr losing/regaining contact with the local node every 30-60s. Ran top on the primary during a flapping episode and saw 89% CPU steal time (%st), load average 30+ on a 2-vCPU box, while individual Postgres backends were each only using 3-7% CPU.
Killed stale idle connections and did a fly machine restart — no lasting change. Then resized the VM from shared-cpu-2x to performance-2x, and shortly after resized it back down to shared-cpu-2x again — it’s been stable since. On our Grafana dashboard, four panels all show a clean step-change right around that point: the CPU Utilization panel’s throttling indicator drops to zero, 5min Load Avg drops from a flat ~1100-1600% down to ~0% and stays there, memory usage drops to a lower steady baseline, and App Concurrency goes from violent 0↔90 thrashing to a calmer pattern.
Update: it recurred roughly 40 minutes later, same signature (throttling band back on the CPU panel, load avg spiking to 1000-1500%), on the same machine, still on shared-cpu-2x — so whatever the resize did wasn’t a lasting fix.
Questions:
- What typically causes CPU steal time this high (89%) and sustained throttling on shared-cpu-2x?
- What does a vm-size change actually do to a machine’s placement — restart in place, or reschedule onto different hardware?
- Any recommendations for what to check or do if this happens again?Would appreciate input from Fly staff if anyone’s around — happy to share more logs/timestamps.

