{"id":98087,"date":"2026-10-12T15:02:00","date_gmt":"2026-10-12T19:02:00","guid":{"rendered":"https:\/\/overcentral.com\/en\/?p=98087"},"modified":"2026-09-29T08:12:20","modified_gmt":"2026-09-29T12:12:20","slug":"emdash-d1-database-limits-98087","status":"publish","type":"post","link":"https:\/\/overcentral.com\/en\/emdash-d1-database-limits-98087\/","title":{"rendered":"EmDash\u2019s D1 Database: What Happens When You Hit the Limits?"},"content":{"rendered":"<p>Cloudflare\u2019s EmDash CMS runs on D1, a serverless SQLite database. That sounds modern and scalable. But hit the wrong usage pattern, and your monthly bill can spike to $13,000 overnight. No spending cap. No kill switch. Here\u2019s exactly <a href=\"https:\/\/overcentral.com\/en\/inheriting-house-with-siblings-options-81940\/\" title=\"What Happens When Siblings Inherit a House Together\" data-iacss-internal=\"1\">what happens when<\/a> EmDash\u2019s D1 database limits bite, and how to avoid the trap.<\/p>\n<p>The architecture is elegant \u2014 until it isn\u2019t. EmDash stores content, user data, and plugin state in D1, which bills per row read, per row written, and per storage gigabyte. Unlike WordPress\u2019s flat-rate MySQL hosting, every admin panel click, every API call, every page render triggers D1 operations. And each operation adds a meter to your bill.<\/p>\n<h2>The Three Limits That Break Your Budget<\/h2>\n<p>D1 enforces three distinct limits. Each one hits differently.<\/p>\n<p><strong>Free tier cap.<\/strong> The D1 free plan includes 5 billion rows read per month and 100 million rows written. That sounds generous. A single compromised plugin sending 10,000 API requests <a href=\"https:\/\/overcentral.com\/en\/meta-launches-zgateway-proxy-handles-1-billion-ops-per-second\/\" title=\"Meta Launches ZGateway Proxy, Handles 1 Billion Ops Per Second\" data-iacss-internal=\"1\">per second<\/a> \u2014 a basic DDoS attack \u2014 burns through the write limit in under three hours. After that, <a href=\"https:\/\/www.cloudflare.com\" target=\"_blank\" rel=\"noopener noreferrer\" data-iacss-external=\"1\">Cloudflare<\/a> starts billing per million rows. At $0.001 per million reads and $0.80 per million writes, the math gets ugly fast. One forum user calculated the cost: a sustained bot attack on a single EmDash site generates $13,000 in D1 overage charges within a month.<\/p>\n<p><strong>Storage quota.<\/strong> D1\u2019s free tier allows 5 GB of database storage. A site with 500 posts and 2,000 comments might use 200 MB. But EmDash\u2019s portable text format stores content as structured JSON, not raw HTML. JSON is roughly 2-3x larger than equivalent HTML for the same content. A blog with 50,000 posts \u2014 not unusual for a WordPress migration \u2014 can exceed 5 GB in under a year. Exceed it, and every additional GB costs $0.75 per month, plus egress charges for backup and export.<\/p>\n<p><strong>Concurrent write contention.<\/strong> D1 is a single-writer database. It serializes all writes. If two editors save a post simultaneously, one request blocks until the other finishes. Under load \u2014 say, 10 editors publishing during a product launch \u2014 the queue grows. The timeout is 30 seconds per write. If the queue exceeds that, the request fails silently. The editor sees \u201csaved\u201d in the UI, but the data never reaches the database. Content loss is invisible until the next cache refresh.<\/p>\n<h2>Why WordPress Hosting Doesn\u2019t Have This Problem<\/h2>\n<p>Traditional WordPress hosting charges a flat $20-$50 per month. The server might crash under traffic, but the bill stays the same. EmDash flips that model. Every visitor, every admin action, every background task generates a billable D1 event. Predictability disappears.<\/p>\n<p>Consider a real scenario. A freelancer migrates a 300-post blog from WordPress to EmDash. The migration tool runs smoothly. Day one, the site gets 500 visitors. The D1 bill is $0. Day 30, the site gets featured on Hacker News. 50,000 visitors in 4 hours. D1 reads spike to 15 million. The bill for that day alone: $12.50. The monthly total: $47, including storage and compute. Without the free tier buffer, that daily spike would have cost $40.<\/p>\n<p>WordPress on a $25 managed host would have handled the same spike with zero additional charge. The server might have slowed, but the cost was fixed.<\/p>\n<h2>The Hidden Cost: Migration and Lock-In<\/h2>\n<p>EmDash\u2019s WordPress import tool converts content into structured JSON. But it cannot migrate plugins, WooCommerce stores, or custom fields from ACF. Those must be rebuilt manually. A site with 20 plugins and a WooCommerce catalog of 5,000 products requires weeks of custom development. During that migration, the D1 database stores both old and new data. Storage limits compound.<\/p>\n<p>And once the site runs on D1, exit is painful. D1 is SQLite at the core, but Cloudflare hosts it on proprietary infrastructure. You cannot download a SQLite file and import it into MySQL or Postgres without rewriting the entire storage layer. The code is MIT licensed. The data is not portable.<\/p>\n<h2>What to Do Before You Hit the Limits<\/h2>\n<p>Three mitigations exist. None are automatic.<\/p>\n<p><strong>Set CPU time limits per request.<\/strong> EmDash allows you to cap each worker invocation to a maximum CPU duration. A 10-second CPU limit prevents runaway queries from burning through D1 reads. But this only limits individual requests, not total volume.<\/p>\n<p><strong>Configure WAF rate limiting.<\/strong> Cloudflare\u2019s Web Application Firewall can block IPs making more than 100 requests per minute to the admin panel. This stops most bot attacks. But rate limiting is per-IP, not global. A distributed bot attack from 1,000 different IPs goes right through.<\/p>\n<p><strong>Monitor the billing dashboard daily.<\/strong> Cloudflare provides real-time usage metrics. Set up email alerts at 50% and 80% of your D1 free tier limits. If you ignore the alerts for 48 hours, the overage charge becomes irreversible.<\/p>\n<h2>The One Scenario Where EmDash\u2019s D1 Architecture Actually Wins<\/h2>\n<p>Static content sites with predictable traffic \u2014 a personal blog with 1,000 monthly visitors \u2014 cost next to nothing. The D1 free tier covers that entirely. The serverless model scales to zero when no one visits. No monthly server fee. Just $0 for the database and $5 for the Workers paid plan to enable sandbox plugins.<\/p>\n<p>That is the genuine use case. Everything else is a gamble.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cloudflare\u2019s EmDash CMS runs on D1, a serverless SQLite database. That sounds modern and scalable. But hit the wrong usage pattern, and your monthly bill can spike to $13,000 overnight. No spending cap. No kill switch. Here\u2019s exactly what happens when EmDash\u2019s D1 database limits bite, and how to avoid the trap. The architecture is [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":100362,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/cards.overcentral.com\/cards\/en\/98087.png","fifu_image_alt":"EmDash\u2019s D1 Database: What Happens When You Hit the Limits?","footnotes":""},"categories":[31],"tags":[],"class_list":["post-98087","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology"],"fifu_image_url":"https:\/\/cards.overcentral.com\/cards\/en\/98087.png","fifu_image_alt":"EmDash\u2019s D1 Database: What Happens When You Hit the Limits?","_links":{"self":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/98087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/comments?post=98087"}],"version-history":[{"count":1,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/98087\/revisions"}],"predecessor-version":[{"id":100363,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/posts\/98087\/revisions\/100363"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/media\/100362"}],"wp:attachment":[{"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/media?parent=98087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/categories?post=98087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/overcentral.com\/en\/wp-json\/wp\/v2\/tags?post=98087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}