Cloudflare D1 free tier limits: what counts as a row written
Cloudflare D1's free tier allows 100,000 rows written and 5 million rows read a day , counted across every database on the account, and resets at 00:00 UTC . When you go over, every query on every D1 database in the account fails until the reset. We found that out by taking three products down with one load test. Here is what the limits are, what counts as a row, and how to stay under them. The…
Cloudflare's D1 free tier provides a daily limit of 100,000 rows written and 5 million rows read, counting across all databases on the account. This limit resets at 00:00 UTC, and exceeding it results in query failures for every D1 database in the account until the reset. The limits were discovered through a load test on three products, causing all writes to fail.
Read operations remained functional. To avoid exceeding the limit, calculate the row cost before testing, considering insertions, updates, deletions, and schema changes. Simulate volume tests locally with wrangler dev, which has no daily limit. Optimize production tests, store counts instead of events, cap rows per customer or product per day, or move each product to its own account. Monitor row usage via the Cloudflare dashboard or GraphQL Analytics API.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.