D1 free tier hard limits: budgeting a small app’s database after the September 2026 enforcement
涂阿燃 reads Cloudflare’s September 2026 D1 free tier enforcement notice and turns it into a budget for small apps: how rows are metered, which query patterns burn the daily quota, how to find them, and how to degrade gracefully when the quota runs out.
- Products
- D1Workers
- Source
- Author experience涂阿燃的网络日志 (2aran.com)
- Author
- 涂阿燃
Key points
- The author summarizes the change: on Workers Free, once an account’s daily D1 rows read or rows written are exceeded, queries fail until 00:00 UTC (08:00 Beijing time); the quotas themselves (5 million rows read and 100,000 rows written per day) are unchanged, the limit is shared across all projects in the account, and data is not lost. Cloudflare’s September 1, 2026 changelog confirms the enforcement, the midnight UTC reset and that stored data is unaffected.
- He notes the announcement only promises an email when the limit is reached, not earlier warnings, so projects that need advance notice must watch Metrics or build their own monitoring on the GraphQL Analytics API; he also flags that an older D1 release note dated February 10, 2025 already described enforcement, which conflicts with the 2026 notice.
- On metering, he writes that D1 counts rows scanned and written, not SQL statements or rows returned; indexes cut reads but add write amplification and storage. High-risk patterns he lists: filters on unindexed columns, ORDER BY RANDOM() LIMIT 1, LIKE with a leading wildcard, unindexed joins or correlated subqueries, event tables with many indexes, and maintenance SQL run from the console or Wrangler, which also counts.
- His troubleshooting order: find the database in D1 Metrics, rank queries by rows read with wrangler d1 insights, check plans with EXPLAIN QUERY PLAN, then fix the worst first; for graceful degradation, do not retry quota errors, pause background jobs until the reset, and handle the read-limit and write-limit errors separately.
- If optimization is not enough, he says Workers Paid ($5 minimum) removes the free tier’s daily hard stop but bills overage monthly, while Workers requests and CPU time are billed separately.
Original sources
Published
D1 free tier hard limits: budgeting a small app’s database after the September 2026 enforcement
Open original source涂阿燃 reads Cloudflare’s September 2026 D1 free tier enforcement notice and turns it into a budget for small apps: how rows are metered, which query patterns burn the daily quota, how to find them, and how to degrade gracefully when the quota runs out.
More to read
Cloudflare Medivh: a self-hosted near-real-time bill estimator
An open-source, self-hosted monitor that adds today’s estimated usage cost to Cloudflare’s daily-updated billable usage, sends summaries, and calls a webhook when the current cycle crosses a budget.
CloudPrinters.sa: an auth refresh-token bug drove about 2 billion D1 writes and a ~$2,078 charge.
Community user salman1 says D1 normally costs CloudPrinters.sa nothing, but over the August 16 to September 15, 2026 cycle an auth bug rewrote one account's entire refresh-token history every time a stale token was retried, generating roughly 2 billion D1 writes. He says the revoke logic and retry loop were fixed and that a billing ticket requests a courtesy credit for the D1 write overage of about $2,078.
Why hard spending caps take time: Ashley Peacock on billing latency
Ashley Peacock (@ashleypeacock), who works on Durable Objects at Cloudflare, explains from experience why near-real-time spending caps are hard to build, says hard billing caps are coming soon, and suggests budget alerts plus issue alerts in the meantime.