Durable Object alarm loop: $34k in 8 days, zero users, no platform warning

  • Posted 4 hours ago by thewillmoss
  • 9 points
Sharing this as a warning to anyone using Cloudflare Durable Objects with alarms.

Root cause:

My DO agent's onStart() handler called this.ctx.storage.setAlarm() on every wake-up without checking whether an alarm was already scheduled. Combined with 60+ preview Worker deployments each creating independent DO instances, this created a runaway self-health-check loop.

Timeline: - April 3: loop began (zero DO usage before this date)

- April 4-5: peaked at ~930 billion row reads/day

- April 11: found it, fixed it

- April 15: $34,895 invoice due with no billing response yet

The fix:

// Before (dangerous) async onStart() { await this.ctx.storage.setAlarm(Date.now() + 60_000) }

// After (safe) async onStart() { const existing = await this.ctx.storage.getAlarm() if (!existing) { await this.ctx.storage.setAlarm(Date.now() + 60_000) } }

Other things worth doing: - Strip DO bindings from preview environments entirely - Deploy a budget monitor kill switch Worker - Add a circuit breaker that checks alarm state before scheduling

Why I had no warning:

Cloudflare's Workers Usage Notifications only monitors CPU time. Not Durable Object row reads or writes. There is also no hard spending cap for DO operations available in the dashboard or Wrangler config. Nothing would have fired an alert during this runaway. I found out when the bill showed up.

This is worth knowing if you're using DO alarms. The platform will not tell you when DO row reads/writes go exponential. You have to build your own kill switch.

One more thing that I think deserves more attention than it's getting: this is Agents Week. Cloudflare is running a dedicated marketing push right now to get individual developers building AI agents on Durable Objects. Blog posts, announcements, the whole thing. That is a deliberate effort to onboard solo developers and indie founders into a product that can silently generate a five-figure bill with zero platform warning. There is no spending cap for DO operations. The usage notification system doesn't cover DO reads or writes. Cloudflare knows this. Running Agents Week while that gap exists is not a neutral decision.

I've filed Case 02067725. I'm a pre-launch sole proprietor who put all my personal savings into this startup. This bill would financially destroy me for usage that generated zero business value. Sharing here both as a technical warning and because I need help getting this in front of someone at Cloudflare who can make a decision.

Has anyone escalated a billing dispute with Cloudflare successfully?

0 comments