billflare.

风易: On the free tier, do not log in full; logging in full burns the D1 rows-written count first

On 2026-11-14, X user @Michael_liyang (风易) wrote: on the free tier, do not log in full; what full logging burns first is the D1 rows-written count. The approach is: log all errors, with a trace id and an error code; sample only 1% of successes, enough to see the trend; write the sample rate into the config, temporarily raise it when investigating, then lower it back. The chain is request → assign a level → log all errors / sample successes → redact → persist to D1. The author's judgment: logs are for investigation, not for stockpiling for retirement; the rows written that are saved are left for real errors.

Products
D1Workers
Source
Author experience𝕏 post
Author
风易 (@Michael_liyang)

Key points

  • This is a new log-sampling tutorial by this author. It is not merged into the author's batch-write or background-write guides.

Original sources

  1. Published

    Original post

    Read on 𝕏

    On 2026-11-14, X user @Michael_liyang (风易) wrote: on the free tier, do not log in full; what full logging burns first is the D1 rows-written count. The approach is: log all errors, with a trace id and an error code; sample only 1% of successes, enough to see the trend; write the sample rate into the config, temporarily raise it when investigating, then lower it back. The chain is request → assign a level → log all errors / sample successes → redact → persist to D1. The author's judgment: logs are for investigation, not for stockpiling for retirement; the rows written that are saved are left for real errors.

    风易 | AI 工具链

    @Michael_liyang · Original 𝕏 post

    先说结论:免费档里日志别全量记,全量记先烧掉的是D1写行数。做法:1错误全记,带trace id和错误码;2成功只采样1%,够看趋势就行;3采样率写配置,排查时临时调高再降回来。链路:请求→定级→错误全记/成功抽样→脱敏→落D1。日志是给排查用的,不是攒着养老的,省下的写行数留给真正的错误。
Author experienceD1 +4

qianshuixia2026: D1 free row-read cap burned twice in one day, plus R2 and Workers pitfalls after the first paid orders

浅水虾 (@qianshuixia2026) published a 16 November 2026 X article after the first $12 and $29 orders. On 14 November a 10-minute cron full-table scan burned the D1 Free 5 million daily row-read cap in 2 hours 14 minutes; the same evening the author ran wrangler d1 execute --remote statistics that scanned about 4.08 million rows in 5 minutes and hit the cap again, then paid $5 to upgrade to Workers Paid. The article also covers an R2 multipart complete() customMetadata mismatch that failed a >24 MB export five times (50 credits sent as apology), 128 MB / 10 ms / 50-subrequest walls that a paid plan does not lift, and Queues’ 10,000 daily operations with three operations per delivered message.

D1

Kun Save Point (@Savepoint_kk): a D1 bug rewrote unchanged data into a $2,739.12 bill; $2,141 goodwill credit granted.

Kun Save Point (@Savepoint_kk), an indie developer who says he recently lost his job, says a bug repeatedly rewrote unchanged data while inefficient queries amplified reads, producing a $2,739.12 Cloudflare bill already paid via PayPal (D1 rows written $2,641.00, rows read $64.06, other services $34.06); he says his bills were usually under $10 a month. Cloudflare granted a $2,141 goodwill account credit under case #02391058. He asks for it to be converted into a refund to the original PayPal payment, or at least for relief on the $2,641 write charges, and later writes that the initial request was declined and has been reopened for additional review. On October 25 he adds that he missed the only alert email Cloudflare sent, whose amount was not particularly high, and received no further warning before the large card charge; on October 26 he writes that the refund request to the original payment method is still under further review. On November 10 he posts a timeline saying that after following up on November 10–11, support again stated the $2,141 could only remain as account credit and the remaining $598.12 was still undecided while the ticket was being closed.

Author experienceDurable Objects +1

Frequent external backups of Durable Objects cost money; built-in point-in-time recovery exists

@CJavierSaldana says he constantly exported all client data from Durable Objects until the Cloudflare bill arrived, then learned that SQLite-backed Durable Objects and D1 can restore to points in the past, and cut his external backup frequency.