billflare.

How to cap your Cloudflare Workers bill, and what you cannot cap

CostHex concludes there is no dollar cap that stops a Worker, and lays out what can contain a bill instead: per-invocation limits, keeping abusive traffic away, and earlier warnings.

Products
WorkersKVD1R2Durable ObjectsQueues
Source
Author experienceCostHex
Author
CostHex

Key points

  • It cites Cloudflare’s wording that budget alerts do not pause or cap usage, and notes threshold billing is not a cap either; it only triggers a mid-cycle invoice.
  • Brakes it recommends: set limits.cpu_ms just above normal P99 (over-limit requests fail with error 1102), lower limits.subrequests, set workers_dev to false and serve from a route, add a WAF rate-limiting rule on the costliest path, and put the Rate Limiting binding before KV, D1 and paid APIs.
  • For warnings it combines budget alerts at two or three amounts with polling the workersInvocationsAdaptive GraphQL dataset using an Account Analytics Read token. The article ends by promoting CostHex's own monitoring, which it says checks one account hourly on the free tier, has unmeasured end-to-end alert latency and cannot stop a Worker.
  • The October 21 version adds: setting workers_dev to false in Wrangler, because disabling workers.dev only in the dashboard is undone by the next deploy; Bot Fight Mode, Super Bot Fight Mode and Under Attack mode to keep abusive traffic away; per-plan WAF rate-limiting rule counts; and other warnings — Usage Based Billing notifications (Pro or higher), HTTP DDoS alerts and Custom Alerts (beta).
  • Official Workers limits (rechecked 2026-10-14) confirm the 30,000 ms default CPU limit, error 1102 on overrun, and the exceededCpu outcome.

Original sources

  1. Last updated

    How to cap your Cloudflare Workers bill (and what you cannot)

    Open original source

    CostHex concludes there is no dollar cap that stops a Worker, and lays out what can contain a bill instead: per-invocation limits, keeping abusive traffic away, and earlier warnings.

    Read originalArchived

    This archive does not contain the complete text.

    How to cap your Cloudflare Workers bill (and what you cannot)

    Budget alerts come closest
Author experienceWorkers +3

Overseas BabyChang: One domain to master the Cloudflare free stack; the quota table and the six pitfall tables could not be embedded in the body, so the article is not marked complete

On 2026-11-24, X user @Thuweni1 (Overseas BabyChang) posted a short post and attached the article “Master Cloudflare with One Domain: Freely Set Up a Website, Mailbox, Image Host, and AI API.” The short post says one domain plus the free plan can set up a website, a domain mailbox, an R2 image host, and a free AI API, and that the account is handed to an Agent to manage with the cf command line. The article plain_text stops at the heading “Quick reference: free quotas and the most common pitfalls.” Code blocks such as the quota table and the six pitfall tables are in article.entities.code; because they have no position in the body, they have been archived as unplacedBlocks, and the article cannot be marked complete. The author states that quotas follow Cloudflare’s official documentation and may be adjusted later.

D1

hiromsaeden: an unindexed D1 query loop billed $2,129.00; a $953.74 courtesy credit left $645.38 due.

Cloudflare Community user hiromsaeden, in a post-mortem of a personal hobby project on Workers and D1, says an unindexed GROUP BY aggregate query scanned about 877,000 rows to return 30 rows, and an unintended loop triggered about 315,000 runs across two billing cycles. In the Oct 15 – Nov 15 cycle alone, 1,447,580,203,670 rows (1.44 trillion rows) were read, on top of the previous cycle’s usage. The author says the October invoice IN-83890481 was $529.88 USD, paid in full out of pocket; the November invoice IN-89082487 was $1,599.12 USD ($1,447.58 D1 Rows Read + $6.16 Workers CPU + $145.38 tax); and the total billed was $2,129.00 USD against an expected budget of about $20/month. After noticing the issue on Nov 2–3, the author deleted the Worker and the D1 database; Support confirmed all reads had stopped. In case #02408621, Support offered a $275.00 courtesy credit for October and advised holding it until the November invoice was issued on Nov 15. In case #02434399, Support applied a one-time courtesy credit of $953.74 (which included the held $275.00), leaving a final balance of $645.38 USD, and said the review was complete and no further adjustments can be made. The author, having already paid $529.88, says the remaining $645.38 cannot be afforded and the account will be downgraded on Nov 22. The author also says a budget alert fired once at the $37 mark but did not stop the charges, and that D1 currently has no hard spending cap. There is no Cloudflare staff reply on the public thread; the Support actions are reported by the author.

Author experienceContainers +2

gargantuaxdev: A Cloudflare Containers idle-billing warning; the author therefore moved the site to a VPS

On 2026-11-23, X user @gargantuaxdev (GargantuaX | Gx) writes: shipwords v0.3.0 moved from Cloudflare Workers to a VPS. The author says a video site cannot do without ffmpeg, Workers cannot run it, so the only option is Cloudflare Containers, but “it has an idle-billing problem the official team has never fixed, and a little inattention may mean a 上千元 bill.” The author also says that once the site scales up, D1 also has transaction and concurrency problems, and says “CF Workers saves hassle, but not money,” and therefore switched to a cheaper, longer-term VPS setup. The body is complete. “The official team has never fixed it” and “may be 上千元” are the author’s warning, not an official admission, and not an invoice amount.