A library timer kept Durable Objects from hibernating
Anurag Bhagsain (@abhagsain) says YJS awareness’s internal 3-second setInterval stopped their Durable Objects from hibernating, so duration cost accumulated with every new presentation.
- Products
- Durable Objects
- Source
- Author experience𝕏
- Author
- Anurag Bhagsain (@abhagsain)
Key points
- They use YJS with Durable Objects for real-time multiplayer editing in a presentation product. YJS awareness has an internal 3-second setInterval for cursor awareness; it costs nothing in Node.js, but in a Durable Object it prevented hibernation, and since Durable Objects bill duration in GB-s the cost accumulated with every new presentation.
- He says they caught the bug with Claude Code and the Cloudflare observability MCP.
- Official docs (rechecked 2026-10-16): a Durable Object can hibernate only if no setTimeout or setInterval callbacks are scheduled, and idle objects that cannot hibernate keep incurring duration charges.
Original sources
Published
Original post
Read on 𝕏Anurag Bhagsain (@abhagsain) says YJS awareness’s internal 3-second setInterval stopped their Durable Objects from hibernating, so duration cost accumulated with every new presentation.
Anurag Bhagsain
@abhagsain · Original 𝕏 post
We use YJS with Durable Objects for real time multiplayer editing in our presentation product. YJS awareness has an internal function_checkInternal 3s setInterval for cursor awareness. It doesn't cost anything in node js but in durable object it was stopping DO from hibernating Since DO costs based on duration ms GB it accumulated the cost on every new presentation created. I would have never caught the bug with claude code and cloudflare observability MCP
More to read
Budget alerts
Cloudflare documents account-wide spend alerts and their notification limits.
Lion Brain: a Durable Object alarm loop from an AI-coding bug wrote about 250 million rows, roughly $210.
Replying in another user's Community thread, bennygoldstein says a bug written by an AI coding tool made a Durable Object alarm in their Lion Brain app re-index the same data every few seconds on October 10 and 11, 2026, writing about 250 million rows and costing roughly $210 in overage on Workers Paid. He says he only found out from the budget alert email, which never pauses anything, and that he opened a billing case asking for a one-time courtesy credit and a real hard spending cap.
Idle projects can still bill: check background tasks and storage
@An_yhl reads @shmily7’s follow-up as a reason to audit abandoned AI projects: check scheduled background work and storage reads and writes, stop what is unused instead of just closing the page, and turn on alerts knowing they will not stop anything.