billflare.

yaobuilds: Auto-refresh on the stats page may use up the D1 free tier's daily quota of 5 million rows read

On 2026-11-19, X user @yaobuilds reminds: a D1 free account has a daily quota of 5 million rows read, counted by rows scanned. The author gives an example: assuming 10,000 rows are scanned per minute, 24 hours requires reading 14,400,000 rows. The suggestion is to look at meta.rows_read first, then multiply by the number of calls per day; when the total does not need to be updated in real time, it can be cached for a few minutes. The author writes that the busiest "user" may be one's own auto-refresh. This is a usage calculation method, not a bill that has already occurred.

Products
D1
Source
Author experience𝕏 post
Author
老姚造物局 Yao Builds (@yaobuilds)

Key points

  • This is a similar topic to @hontrandev's dashboard list query reading too many rows, but the author and the primary source are different, so it is a separate piece.

Original sources

  1. Published

    Original post

    Read on 𝕏

    On 2026-11-19, X user @yaobuilds reminds: a D1 free account has a daily quota of 5 million rows read, counted by rows scanned. The author gives an example: assuming 10,000 rows are scanned per minute, 24 hours requires reading 14,400,000 rows. The suggestion is to look at meta.rows_read first, then multiply by the number of calls per day; when the total does not need to be updated in real time, it can be cached for a few minutes. The author writes that the busiest "user" may be one's own auto-refresh. This is a usage calculation method, not a bill that has already occurred.

    老姚造物局 Yao Builds

    @yaobuilds · Original 𝕏 post

    一个统计页,怎么把数据库读到下班? D1免费账户每天500万行读额度,算扫描行数。假设每分钟扫1万行,24小时需读1440万行。 先看meta.rows_read,再乘每天调用次数。总数不要求实时更新时,可缓存几分钟。 最忙的“用户”,可能是自己的自动刷新。 https://t.co/C3mssUxWn0
Author experienceD1 +1

风易: What cache fears most is looking up things that do not exist; a crawler scanning random keys makes every request hit D1

On 2026-11-16, X user @Michael_liyang (风易) wrote: what cache fears most is looking up things that do not exist. A crawler scans random keys, penetrates every time, and hits D1 directly, so the cache is added for nothing. The approach is to cache empty results as well, and give the TTL only 5 minutes; log high-frequency nonexistent keys to D1, and blacklist them once confirmed to be a crawler. The chain is request → check cache → return on hit → query D1 on miss → write an empty-value cache if it does not exist. The author's judgment: the cache prevents repeated lookups; it does not block lookups of nonexistent things on the database's behalf.

R2

maisui: a migration script's recursive R2 listings produced 14.38M Class A operations, about $63; a one-time goodwill credit requested.

Cloudflare Community user maisui says that on November 11–12, 2026, while migrating about 425 GB (1.31M objects) out of an R2 bucket, a script listed the bucket recursively through the S3 API without fast-list; with nearly one object per directory each listing issued about 1.31M Class A operations, and about 11 runs produced 14.38M Class A operations (13.38M billable), about USD 63 on the cycle invoice. The author calls it a one-off script defect, says the usage alert only fired after daily aggregation, has fixed the script and set low billing alerts, and asks for a one-time goodwill credit; the Free plan support portal did not show a Billing case form.

Author experienceWorkers +3

Turn free allowances into daily budgets with alerts at 70% and 90%

风易 (@Michael_liyang) says 100,000 requests a day and 5 million rows read a day are hard walls, not a safety margin: split production and test into different Workers and D1 databases, alert at 70% and 90%, and degrade before the site returns 500s.