D1’s 100,000 daily row writes: how naive upserts took a sanctions app offline
A DEV Community post by Oleksandr (alexcodebytes) describes a Workers + D1 compliance app whose ingestion hit D1’s free daily write limit (error 7500) because every upsert counted as a write, and the fixes: a WHERE clause on DO UPDATE, per-run page caps, and staging raw files in R2.
- Products
- D1R2Workers
- Source
- Author experienceDEV Community
- Author
- Oleksandr (alexcodebytes)
Key points
- The author’s ingestion pipeline failed with D1 error 7500: "Your account has exceeded D1's free tier daily row write limit. Upgrade to a paid plan or wait until tomorrow (midnight UTC) to continue." He says the database went read-only.
- He says the cause was INSERT ... ON CONFLICT DO UPDATE on every record (33,000+ sanctions records plus daily cron jobs and search logs): D1 counted the attempts as writes even when nothing changed, so he hit the 100,000 writes/day ceiling.
- Fix 1: add a WHERE clause to DO UPDATE so identical rows are skipped. Fix 2: cap ingestion per run (MAX_PAGES_PER_RUN) and save the offset for the next run. Fix 3: download raw files to R2 first and parse into D1 separately, so a D1 quota stop does not force a re-download.
- If already locked out, he says there is no bypass until 00:00 UTC. The D1 pricing page read on 2026-10-28 lists 100,000 rows written per day on Free, resetting at 00:00 UTC, with queries failing once the daily limit is hit.
Original sources
Published
D1’s 100,000 daily row writes: how naive upserts took a sanctions app offline
Open original sourceA DEV Community post by Oleksandr (alexcodebytes) describes a Workers + D1 compliance app whose ingestion hit D1’s free daily write limit (error 7500) because every upsert counted as a write, and the fixes: a WHERE clause on DO UPDATE, per-run page caps, and staging raw files in R2.
More to read
Ru Bite: In Spend Management, turn on Block usage under Billing → Spend limits; limits reset on the subscription billing period, the notification email must be filled in separately, and after Durable Objects are paused storage fees may still continue
On 2026-11-19, X user @JustLikeBit (Ru Bite) wrote a set of notes on metered cloud services having their free quota burned through by bots, and on Cloudflare Spend Management. The author says the entry point is Billing → Spend limits: select Workers or Durable Objects, set a limit, and turn on Block usage; once the limit is hit, supported operations are blocked automatically, and it does not rely only on email alerts. A follow-up adds: limits reset on the subscription billing period, not necessarily on the 1st of each month—for example, if the renewal date is the 15th, counting starts from the 15th; to receive emails at the 80% and 100% thresholds, notification_email must also be configured separately, and setting a limit does not fill in the notification email automatically; after Durable Objects are paused, storage fees for existing data may still continue. The author attached a link to the official documentation. These are the author's restatement of official capabilities and operational reminders, not an actual bill.
stevesprompt: an agent clicked Upgrade in the Cloudflare dashboard and charged $1.5k; the money was refunded.
X user @stevesprompt (Steve Huang) says an agent clicked Upgrade in his Cloudflare dashboard and he was charged $1.5k, and that the money was luckily refunded. The author then lists precautions before an agent can spend money or send anything. The post does not name the product that was upgraded. There is no official public Cloudflare response in the thread.
Observability pricing (from December 1, 2026)
Cloudflare’s unified pricing for logs and traces: Workers Logs, Workers Traces, Containers logs, R2 data access logs and AI Gateway logs move to per-GB ingestion and GB-month storage on December 1, 2026.