Cloudflare Workers Free Plan Limits, Measured

On Cloudflare's free plan, the documented number is often where a limit starts to apply, not where it stops you. We built a small read-later API on Workers, D1 and KV, deployed it to a test account, and pushed it past the main free plan limits one at a time. The per-request limits held to the exact number. The daily allowances let us go several times over before anything refused, and two never refused while we were checking: requests (225,000 in the day, no Error 1027 at any point) and D1 writes. The 10 ms CPU limit let single requests run for more than a second, then cut off a steady 21 ms PBKDF2 endpoint completely within two and a half minutes.
If you run anything real on the free plan, how each limit fails matters more than its number: some throw an exception your code can catch, some replace your response with a Cloudflare error page, and some arrive an hour late. Here is what each one did, with the numbers, the error text and the repo to reproduce it.
TLDR
- Per-request limits are exact. The 51st
fetch()throws, and a fetch that follows a redirect costs two. KV stops at 1,000 operations per request. D1 also stopped at 1,000 queries, not the documented 50. - CPU is not a wall at 10 ms. Single requests used up to 1,195 ms and succeeded, while others were killed at exactly 10 ms. Two steady runs of 16 and 21 ms PBKDF2 requests worked for 4 and 2.5 minutes, then every request failed with Error 1102.
- KV's daily limits arrive minutes late. 6,700 writes went through on a 1,000-write allowance before
KV put() limit exceeded for the day.Bulk reads count per key. - D1's daily limits arrive later still. We read 18 million rows on a 5 million allowance; reads were refused about an hour later and stayed refused until the UTC day ended. Writes at 191% of the allowance were still accepted three hours later.
- The 100,000 requests a day never stopped us. Cloudflare counted 225,027 requests on the account that day, 225% of the limit, and not one request got Error 1027. Checks every 5 minutes kept getting 200 until 23:47 UTC.
- Two deploy-time surprises. Wrangler's default source map upload hit a 15 MiB (gzipped) limit long before the 64 MiB Worker size limit, and a sixth Cron Trigger failed the deploy after wrangler had already uploaded and deployed the Worker.
Prerequisites
- A Cloudflare account you use only for tests. The daily limits are per account, so a test that uses one up affects every other Worker on that account that needs the same resource, until 00:00 UTC.
- Node.js 22 or later, and
wrangler4 (the demo pins 4.163.0). - For the subrequest and load tests, a short-lived Linux VM. 2 vCPUs are plenty.
- Basic familiarity with Workers, D1 and KV.
The app
The measurements run against Shelf, a read-later API we wrote for this post. It is small but does ordinary things: you save a URL, the Worker fetches the page and reads its title, lists are cached in KV for a minute, and a Cron Trigger re-checks old bookmarks for dead links every 15 minutes.
Each route touches a different limit. Saving a bookmark costs a subrequest and CPU that grows with the size of the page. A cached list costs one KV read; a cache miss costs D1 rows read and one KV write. Search can scan the whole table, because a substring search cannot use an index. The cron job spends one subrequest per checked link.
To push one limit at a time without changing the app, the Worker also has /lab routes behind a separate token: a CPU loop, PBKDF2, an HTMLRewriter unfurl of a page of a chosen size, a memory allocator, and loops of fetch, D1, KV and Cache API calls. Without the token they answer 404.
The limits, as documented
These are the Workers Free limits that apply to an app like this, from Cloudflare's Workers limits, D1 pricing, D1 limits, KV limits and Observability pricing pages, checked on 2026-12-01:
| Limit | Workers Free | Scope | What the docs say happens |
|---|---|---|---|
| Requests | 100,000 a day | account, resets 00:00 UTC | Error 1027; on a route, fail open skips the Worker, fail closed shows the error |
| CPU time | 10 ms per request and per cron run | invocation | "some built-in flexibility" for infrequent overruns, then Error 1102 |
| Memory | 128 MB | isolate | Error 1102 |
| Subrequests | 50, and 1,000 to Cloudflare services | invocation | each redirect counts |
| D1 queries | 50 | invocation | a batch() counts as one |
| KV operations | 1,000 | invocation | a bulk read counts as one |
| D1 rows read | 5,000,000 a day | account | "you will not be able to run queries against D1" |
| D1 rows written | 100,000 a day | account | same |
| D1 storage | 500 MB per database, 5 GB per account | delete data before inserting more | |
| KV | 100,000 reads, 1,000 writes, 1,000 deletes, 1,000 lists a day | account | "further operations of that type will fail" |
| Cron Triggers | 5 | account | |
| Worker size | 64 MiB uncompressed | Worker | |
| Logs | 0.5 GB ingested a day, 7 days kept | account | ingestion stops until 00:00 UTC |
Two lines in that table are newer than most guides. Workers Logs moved from 200,000 events a day to a 0.5 GB daily ingestion allowance on 2026-12-01, and the free Worker size limit is 64 MiB, the same as the paid plan, where older guides still quote 3 MB.
How we measured
The short version: a dedicated free account, mostly one limit at a time, every request counted on our side, and Cloudflare's own view recorded next to it. Two runs did overlap: a short extra subrequest run (10:11 to 10:13 UTC) ran during the KV write test, and Shelf's own cron job kept running every 15 minutes throughout.
A separate account. Every daily limit above is per account. Using one up affects every Worker on that account that needs it until midnight UTC, so the tests ran on a free account that held nothing but this app. The repo's scripts/preflight.mjs refuses to run if the account has any Worker, D1 database or KV namespace that is not part of the test.
Our own counts, from the source. Each D1 query returns rows_read and rows_written in its meta, and the Worker adds them up per request. The KV probes count every key and every call. The load generator counts every response by outcome. So when a limit kicked in, we know how much our side had used, independent of Cloudflare's dashboards.
Cloudflare's view, recorded separately. CPU time per invocation and the invocation outcome (ok, exceededCpu) come from wrangler tail, joined to each probe request by an id the Worker logs. Daily totals come from the GraphQL Analytics API. Where the two disagree, we show both.
Controlled work, then realistic work. The CPU tests start with a pure JavaScript loop, then run work an app really does: PBKDF2 through WebCrypto and parsing a fetched HTML page with HTMLRewriter. Timers do not advance during CPU work inside a Worker, so the Worker cannot time itself; CPU numbers come only from the tail.
Delivery checks. The subrequest probes fetch from a small server on the test VM that counts what arrives, so "50 fetches completed" is checked against 50 requests received, including one per redirect.
Stamped runs. Every result line carries a hash of the code and the limits file, and the repo maps each hash to a commit. A lock file keeps two runs from writing the same probe's results.
What went wrong, and what it changed. Five things went wrong, and the first four changed how the rest ran. The runs we threw away are in the repo under results/discarded/.
- One probe spoiled the next. The subrequest run at 09:52 UTC started seconds after the CPU and memory ladders. Its KV, Cache API and redirect loops died with Error 1102, a CPU error, in a test that does little CPU work. Our best explanation is the CPU behaviour described below: the heavy requests just before it. We re-ran the same plans at 10:07, about 14 minutes after it ended, and the re-run was clean. After that, we left the Worker idle before every probe that was not itself a CPU test.
- The error page depends on the client.
curlgets a plainerror code: 1102. Node'sfetchgets an HTML page with the code in a<span class="cf-error-code">. Our first parser looked only for the plain form, so the first ladder recorded "503" with no code. We fixed the parser and re-ran. - Stopping too early. We stopped the KV list and D1 read runs by hand (a small cap script) after three to four times the limit, about 27 and 71 seconds in. The daily limits are enforced minutes late, so those runs ended before anything could refuse them. They are kept as incomplete runs, and we added a slow check after them: one request per allowance every 45 seconds for 15 minutes.
- The tail is incomplete. At about one request a second (the sustained PBKDF2 runs),
wrangler taildelivered 287 of 287 events in each run. During the ladders, at 2 to 3 requests a second, it delivered 38% to 44% of them, and we cannot show the missing ones were a random sample. Every CPU number below comes from the events that did arrive; the HTTP outcome of every request comes from the client, which saw all of them. - The overnight watch missed midnight. Our scripts refuse to run against the cloud when the account check (
preflight.mjs) is more than 12 hours old, a guard meant to stop runs against the wrong account. The night script did not re-run that check, so the watch that was meant to poll through 00:00 UTC exited at 23:52, and so did the check planned for after the reset. The reset section below says what we could still establish.
Cost. The Cloudflare account is free. The load generator and the subrequest target ran on a 2 vCPU droplet for about 15 hours (it also ran the overnight reset check), about $0.55, deleted afterwards.
Per-request limits: the documented number, mostly
The per-invocation limits are the ones that behaved exactly like their documentation, with one exception. The table uses the 10:07 UTC re-run and, for the 100 and 1,000 D1 query plans, a run at 10:11 (the 09:52 run is excluded, see above). Each plan ran two or three times, and every run of a plan gave the same answer.
| Plan, in one invocation | Completed | What happened next | Requests the target received |
|---|---|---|---|
50 fetch() calls |
50 | nothing, 200 | 50 |
51 fetch() calls |
50 | the 51st threw | 50 |
| 25 fetches that each follow 1 redirect | 25 | nothing, 200 | 50 |
| 26 fetches that each follow 1 redirect | 25 | the 26th threw | 50 |
| 5 fetches that each follow 9 redirects | 5 | nothing, 200 | 50 |
51 Cache API match() calls |
50 | the 51st threw | 0 |
1,000 KV get() calls |
1,000 | nothing, 200 | 0 |
1,001 KV get() calls |
1,000 | the 1,001st threw | 0 |
| 60 bulk KV reads of 100 keys (6,000 keys) | 60 | nothing, 200 | 0 |
| 51 D1 queries | 51 | nothing, 200 | 0 |
| 1,000 D1 queries | 1,000 | nothing, 200 | 0 |
| 1,001 D1 queries | 1,000 | the 1,001st threw | 0 |
| 40 fetches, then 20 D1 queries | 60 | nothing, 200 | 40 |
| 20 batches of 100 D1 statements | 20 | nothing, 200 | 0 |
The error is an ordinary exception your code can catch, not a Cloudflare error page:
Too many subrequests by single Worker invocation. To configure this limit, refer to https://developers.cloudflare.com/workers/wrangler/configuration/#limits
For KV and D1 the text is Too many API requests by single Worker invocation, followed by the same link.
Three things in that table are worth keeping:
- Redirects count. A
fetch()that follows one redirect is two subrequests. A link checker that follows redirects can run out at half the number of URLs you planned for. Shelf's cron job checks 40 links per run, which leaves room for 10 redirects, not 40. - The Cache API stops at 50 too. 51
caches.default.match()calls failed at the 51st, with the same message asfetch(). The docs say the two share one quota; we did not run a mixed plan to confirm that. - D1 allowed 1,000 queries, not 50. The D1 limits page lists 50 queries per invocation on the free plan. We ran 51, then 1,000, and the 1,001st failed with the same error KV gives at 1,000. D1 queries also did not use up the
fetch()budget: 40 fetches plus 20 queries completed. In practice D1 sits in the 1,000 "subrequests to internal services" bucket. We would still write code to the documented 50, because a documented limit is the one Cloudflare can start enforcing without notice, anddb.batch()makes it easy: 20 batches of 100 statements counted as 20 queries.
CPU: over 10 ms is fine, until it is constant
The CPU limit was the most interesting one, because it did not behave like a number at all.
Single heavy requests often pass. Across every invocation of the pure JavaScript loop that the tail recorded, 602 succeeded: 40 of them used more than 10 ms of CPU, 29 more than 100 ms, and the largest 1,195 ms. Of the 47 recorded kills, 30 were stopped at exactly 10 ms, one at 20 ms, and 16 were allowed to run for 229 ms to 2,300 ms first. Ten minutes after the Worker had been idle, 12 requests that each allocated and filled 96 to 140 MiB used 62 to 181 ms of CPU each, and all 12 succeeded.
Whether one heavy request survived was not predictable from the request. Three identical heavy requests sent back to back: the first used 1,079 ms and succeeded, the second was killed after 229 ms, the third at 10 ms. Twenty seconds earlier, three of the same had all succeeded at 731 to 746 ms. Light requests in between did not help: with 200 requests of 0 to 6 ms (2 ms median, where recorded) between each heavy one, 5 of 7 heavy requests were killed after 1,478 to 2,048 ms. The docs describe "some built-in flexibility to allow for cases where your Worker infrequently runs over the configured limit". That is what single requests saw: a large allowance, granted some of the time.
Constant overruns get cut off, all at once. The realistic test is the one the docs warn about: a Worker that runs over consistently. We sent one PBKDF2 request per second for five minutes, like a login endpoint under steady use:
At 50,000 iterations (16 ms median among the successful requests) every request succeeded for 4 minutes and 7 seconds, 236 in a row. From then on every request failed, all 51 of them: 50 killed at 10 ms and one at 15 ms. At 100,000 iterations (21 ms median) the switch came after 2 minutes and 25 seconds and 138 requests, and the next 149 all failed. In both runs there was no gradual degradation: one request was fine and every request after it, to the end of the run, was killed. The 100,000-iteration run started two minutes after the 50,000-iteration run ended, and its first 138 requests succeeded. These are two runs; they show what can happen, not a guaranteed grace period or a rule for when the cut-off ends.
The client sees a 503 with an HTML page titled Worker exceeded resource limits and the code in <span class="cf-error-code">1102</span> (or the plain text error code: 1102 for clients like curl). Your code never runs its error handling; the response comes from Cloudflare.
What real work costs, per request, from the tail:
| Work | CPU per request |
|---|---|
| PBKDF2-SHA256, 10,000 iterations | 2 ms (10 recorded) |
| PBKDF2-SHA256, 50,000 iterations | median 16 ms, p90 24 ms (236 successful invocations) |
| PBKDF2-SHA256, 100,000 iterations | median 21 ms, p90 38 ms (138 successful invocations) |
| HTMLRewriter title extraction, 50 KB page | 0 to 2 ms (10 recorded) |
| HTMLRewriter title extraction, 1 MB page | 1 ms (4 recorded) |
| HTMLRewriter title extraction, 5 MB page | 4 to 10 ms (4 recorded) |
| Waiting 2 seconds on a timer | 0 ms (3 recorded) |
Waiting is free, as documented: a request that waited two seconds used 0 ms of CPU. HTMLRewriter is cheap enough that Shelf can unfurl pages of several megabytes. PBKDF2 is the trap: current password-hashing guidance asks for far more iterations than 100,000, already over 10 ms on every request, and a steady stream of logins at that cost was cut off within minutes.
Memory: what a single request could allocate
The memory probe allocates N MiB of Uint8Array and writes to every byte. Our first memory ladder ran straight after the CPU ladder: 6 of 10 requests at 64 MiB and every request from 96 MiB up died with Error 1102 (outcome exceededCpu wherever the tail recorded one), because filling the arrays takes 60 to 250 ms of CPU. That was the CPU limit, not memory. After 10 idle minutes the same requests went through: 96, 104, 112, 120, 128 and 140 MiB, two of each, all succeeded. A second pass, one request per size, again after 10 idle minutes, succeeded at 160 and 200 MiB and failed at 256, 320, 400 and 512 MiB with the same 1102 page for the client. The tail recorded three of those four, all with the outcome exceededMemory.
So a single request allocated and filled 200 MiB on a Worker with a documented 128 MB limit, and got its response. That does not mean the limit is higher: the docs say that when an isolate goes over 128 MB, in-flight requests are allowed to finish and later requests get a new isolate. What we saw fits that, and it means a request can briefly use more than 128 MB and still succeed. Do not build on it.
Daily allowances: enforced late, after you are far past them
The daily limits are where the documentation and the platform differ most. None of them stopped a request at the documented number. KV stopped us minutes later, at several times the limit. D1 stopped reads about an hour later, at 3.6 times the limit, and had not stopped writes at all when our tests ended.
KV: 6,700 writes on a 1,000-write allowance
We used up each KV allowance in turn: writes of distinct keys in batches of 100, then lists, then reads:
| KV allowance | Documented | Ours when the limit was crossed | Ours when KV first refused | Delay |
|---|---|---|---|---|
Writes (put) |
1,000 a day | 10:12:19 UTC | 10:18:42 UTC, after 6,700 writes in this run | about 6.5 minutes |
Reads (get) |
100,000 keys a day | about 10:20:28 UTC, by keys, counting 26,997 from earlier tests | refused at the first check, 10:27:37 UTC, after 171,000 keys in this run | first refusal about 7 minutes after our count crossed; real delay unknown |
| Lists | 1,000 a day | 10:18:52 UTC | refused at the first check, 10:27:37 UTC, after 3,500 lists | first refusal about 9 minutes after; real delay unknown |
The refusal is an exception inside your Worker, with a clear message:
KV put() limit exceeded for the day.
KV get() limit exceeded for the day.
KV list() limit exceeded for the day.
Bulk reads count per key. The reads probe used bulk get() calls of 100 keys first: 1,500 calls, 150,000 keys. If the daily allowance counted calls, the whole run (22,500 calls including the single reads after it) would have stayed under 100,000. KV refused reads anyway, so the 100,000 is keys. A bulk read saves you per-invocation operations, not daily allowance. (The reads run itself ended on Error 1102 from its 1,000-read requests, not on a KV refusal; the refusal came in the checks after it.)
Same-key writes have a short burst. Writing one key in a tight loop, 11 writes in about two seconds succeeded, then the next attempts failed with KV PUT failed: 429 Too Many Requests. The documented limit is one write per second per key.
What this means for Shelf: a list served from KV costs no write, and a miss writes the cached list back with a 60-second TTL, so in steady traffic each tag's list is written about once a minute (concurrent misses can add a few more). That is why it uses a TTL instead of deleting the cached list on every save: deleting on save would cost one of the 1,000 daily deletes per bookmark.
Cloudflare's KV analytics (kvOperationsAdaptiveGroups) were slow to show this. A pull at 10:27 UTC, after all three overruns, still showed only 296 writes and 27,828 reads. A pull at 11:38 UTC showed 6,602 writes against our 6,711 accepted, 210,046 reads against our 197,997 accepted keys (plus reads inside invocations that were later killed, which we could not count), and 4,063 lists against our 3,500. By then all three were several times the free allowance in Cloudflare's own numbers.
D1: 18 million rows read on a 5 million allowance
D1 is where the documented behaviour, "you will not be able to run queries against D1", showed up last, and only for reads.
We added 50,000 rows to a probe table (51,001 rows in total) and scanned it with batched SELECT count(*), sum(v) queries. In 71 seconds the run read 17,697,347 rows by D1's own meta, 3.5 times the daily allowance, and every query succeeded. Then we inserted rows in steps of 10,000, then 1,000, then 100: 137,200 rows in 104 seconds, on top of at least 53,260 written earlier that day, and every insert succeeded. Cloudflare's analytics, pulled at 11:38 UTC, agree with our counts: 18,039,384 rows read (361% of the allowance) and 190,557 rows written (191%) on the account.
Then we kept checking. One D1 read and one D1 write every 45 seconds for 15 minutes all succeeded, while the KV checks in the same loop were refused every time. Shelf's own cron job found the moment for us: its run at 11:15:58 UTC read and updated bookmarks as usual, and its run at 11:30:58 died with this exception, which the next manual check at 11:49 UTC got as well:
D1_ERROR: Your account has exceeded D1's free tier daily row read limit. Upgrade to a paid plan or wait until tomorrow (midnight UTC) to continue.
So D1 started refusing reads between 51 and 66 minutes after our reads passed 5 million. They stayed refused for the rest of the UTC day: Shelf's cron job failed every 15 minutes from 11:30:58 to 23:45:58 and succeeded again at 00:00:58. Writes were never refused while we checked: one-row writes succeeded at 11:49, 12:11 and 13:32 UTC, the last more than three hours after the write test ended at 191% of the allowance.
We do not know whether the delay is a deliberate grace or an enforcement job that runs on a long cycle, or why writes were still accepted. The pricing page says queries stop, and for reads they did, so design as if they will.
Two smaller observations from D1's own meta:
- The index write is real. Inserting 1,000 rows wrote 1,000 rows into a plain table and 2,000 into the same table with one index on the inserted column, as the pricing page describes.
- Rows read is not only table rows. A recursive CTE that produces 100,000 numbers and touches no table reported 100,001 rows read. The pricing page does not spell this out.
The reset at 00:00 UTC
The daily limits reset at 00:00 UTC, according to the docs. We confirmed that the used-up allowances came back; we did not capture the exact moment.
- Shelf's cron job failed on every run from 11:30:58 to 23:45:58 UTC, and succeeded on every run from 00:00:58 UTC onward. Its first failure, which the tail recorded, was the D1 read refusal, and the job also reads KV.
- A check at 01:15 UTC on 2026-12-02 found everything working again: a KV write, read and list, a D1 read and write, the cached list route and
/healthzall returned 200, and Cloudflare's analytics showed the new day starting from almost zero.
So the cron job's D1 reads came back somewhere between 23:45:58 and 00:00:58 UTC (assuming its later failures had the same cause as the first one we recorded), which fits a reset at midnight, and KV was back by 01:15 at the latest. The request limit had never triggered, so there was nothing to reset there.
D1 storage: refused whole, then a little more
We filled a separate database with 1.9 MB random blobs, 10 per batch. At 495,128,576 bytes the next batch, which would have taken it past 500 MB, failed whole with D1_ERROR: Exceeded maximum DB size; none of its 10 rows were stored. A read, a one-byte insert and a delete all still worked straight after. So the limit refuses the write that would cross it, it does not make the database read-only.
100,000 requests, and after
This is the limit with the most visible failure on paper: Error 1027 for every request once the account passes 100,000 in a UTC day, or the request skipping the Worker on a route set to fail open. We never saw either, all day.
At 11:49 UTC, with about 4,900 requests already counted for the day, we sent 120,000 requests to Shelf's /healthz from the test VM, 250 a second over 8 minutes. Our count passed 100,000 at about 11:55:40. All 120,000 came back 200. A recorded check every 5 minutes from 11:57, and every 30 seconds from 12:03, kept getting 200. At 13:32 UTC, 96 minutes after the crossing, we sent another 100,000: all 200 again. Cloudflare's own analytics counted 222,219 requests on the account for the day at 13:39 UTC, 222% of the limit, and every check up to 13:40 still got 200. The 5-minute check then ran until 23:47 UTC: 143 checks, all 200. A last look at 23:52 found the second Worker on the account, and its static asset, still answering 200 (that one is only in the runner's log). Cloudflare's final count for the day was 225,027 requests.
We cannot tell from outside whether this is a delay like D1's, a limit that is not enforced on workers.dev, or one that applies only above some level we did not reach. What we can say is that neither run met Error 1027, at 1.2 or 2.2 times the limit, and no request to the account did for the rest of the UTC day.
Deploy-time limits: the two surprises
Worker size: the source map hits first
The documented free limit is 64 MiB uncompressed. We built Workers that are mostly one random, incompressible string and deployed them with wrangler 4.163.0:
| Bundle | upload_source_maps |
Result |
|---|---|---|
| 1 MiB | default | deployed, served 200 |
| 16 MiB | default | deployed, served 200 |
| 20 MiB | default | refused, code 10021 |
| 24 MiB | default | refused, code 10021 |
| 32 MiB | default | refused, code 10021 |
| 32 MiB | false |
deployed, served 200 |
| 48 MiB | false |
deployed, served 200 |
| 63 MiB | false |
deployed, served 200 |
| 65 MiB | false |
refused, code 10027 |
The 20 MiB refusal is not the size limit. It is the source map:
total sourcemap size is too large, must not exceed 15 MiB when gzipped (received 20500 KiB / 15447 KiB gzipped) [code: 10021]
Recent wrangler versions upload source maps by default (upload_source_maps "Defaults to true for wrangler deploy", in wrangler's own config schema), and the source map carries the original source. Real code compresses much better than our random padding, so a real bundle would hit this later than 20 MiB, and some bundles will reach the code limit first. For our bundles, the limit we met first was 15 MiB of gzipped source map, not 64 MiB of code. With source maps off, the documented limit held: 63 MiB deployed and served, and 65 MiB failed with Your Worker exceeded the uncompressed size limit of 63.9 MiB. [code: 10027].
Cron Triggers: the deploy fails after the code is live
Shelf has one Cron Trigger. A second Worker with 4 triggers deployed fine, making 5 on the account. With 5 triggers, making 6, wrangler deploy exited with status 1, but only after this:
Uploaded wfpl-cron-probe (4.90 sec)
Deployed wfpl-cron-probe triggers (2.40 sec)
✘ [ERROR] Trigger configuration for "wfpl-cron-probe" was only partially updated:
Cron schedules:
- This account has reached the Workers Free limit of 5 cron triggers per account. Upgrade to Workers Paid to increase this limit to 1,000 [code: 10072]
Successful trigger changes were not rolled back.
By wrangler's own output, the Worker was uploaded and deployed before the schedule update failed, and nothing was rolled back. (Our probe redeployed the same code, so we did not separately verify a code change going live.) A CI pipeline that treats a failed deploy as "nothing changed" can be wrong here: the upload may be live while the schedules are not what the config says.
What Cloudflare's analytics showed
We pulled the GraphQL Analytics API through the day and compared it with our own counts:
- D1 matched us almost exactly.
d1AnalyticsAdaptiveGroupsshowed the overrun within minutes, and its totals were within a fraction of a percent of themetacounts our Worker added up. - KV was slow, then close. At 10:27 UTC, after all three KV overruns, it still showed under 30,000 reads; by 11:38 writes were within 2% of ours, reads 6% above our (incomplete) count and lists 16% above.
- Requests lag a little. Right after the request test, the dataset showed 116,724 requests for the day while our client had sent more than 124,000; at 12:22 UTC it showed 124,442. The final count for the day was 225,027.
- The outcome names differ from the error codes. CPU kills appear as
exceededResources, memory kills asexceededMemory, and a KV or D1 refusal shows up only if your code lets the exception escape, asscriptThrewException. A Worker that catches every refusal and returns a fallback would look healthy in these numbers while it serves stale or empty data. - Cron runs on its own clock. All 56 runs of Shelf's
*/15 * * * *trigger that day, from 10:00:58 to 23:45:58 UTC, had a scheduled time 58 seconds past the quarter hour and started within two seconds of it, using 3.1 to 7.3 ms of CPU. From 11:30:58 on all 50 remaining runs failed; the first failure, which the tail recorded, was the D1 read refusal.
So the analytics are useful, but late: D1 showed up within minutes, while KV still showed 296 writes at 10:27, ten minutes after writes had started being refused, and caught up some time before our 11:38 pull. Nor do they tell you when enforcement will start: at 10:27 they already showed about 360% of the D1 read allowance, and a D1 read in the cron job still succeeded at 11:15:58.
Designing for the free plan
Treat each limit by how it fails, not by its number.
- Per-request limits are exact and catchable. Count your
fetch()calls including redirects, keep a margin under 50, and catch the exception. For D1 and KV, batch: onedb.batch()or one bulkget()is one operation against the per-request limit. - CPU is the limit to design around. Occasional requests over 10 ms often succeeded. Both of our steady 16 to 21 ms PBKDF2 runs worked for a few minutes and then failed every request to the end of the run; we cannot predict the cut-off for other workloads. If something is CPU-heavy on every call (password hashing, image work, large JSON transforms), test it under steady load on the free plan, or plan for the paid plan, where the default limit is 30 seconds.
- Daily allowances are enforced late. KV refused only after several times its allowance had gone through, so a burst can spend a whole day's KV writes before anything stops it. Rate-limit your own writes, and keep the hot path off KV writes: Shelf writes its cache only on a miss.
- Know which dependency fails first, and make it fail soft. When KV writes are refused, Shelf's list route still answers, because the cache write runs in
waitUntil()after the response is built. When KV reads are refused, the same route throws and the visitor gets Cloudflare's Error 1101 page (we saw exactly that at 11:49 UTC), so a cache read should catch the error and fall back to D1. - Count, then watch. Cloudflare's analytics showed every overrun here, but KV's only after a delay, so they work as a daily check rather than a brake. For protection that reacts in time, count your own KV writes and D1 rows (the
metaon every D1 result makes this easy) and stop or degrade before the allowance is gone. The repo'sscripts/analytics.mjs --todayprints Cloudflare's view of the day so far.
For a broader look at where Workers sit among serverless hosts, the Vercel vs Netlify vs Cloudflare Pages comparison covers the static and front-end side, and D1 is SQLite underneath, so the SQLite vs PostgreSQL comparison applies to its query costs. For why CPU time is not wall time and what the missing long-lived process changes, see Where Your Code Runs When There Is No Region.
What we could not conclude
- One account, one day, one location. Every test ran from one VM in Frankfurt against one account on 2026-12-01. Enforcement may differ by data center, and Cloudflare can change it without notice.
- What decides a CPU kill. We saw single requests of over a second succeed and others killed at 10 ms, and we saw constant 16 to 21 ms requests cut off after two to four minutes. We do not know the rule behind either, or how long a cut-off lasts.
- The exact moment of the reset. Our overnight watch was meant to poll through midnight, but it exited at 23:52 UTC because of a bug in our runner (described in the repo's known gaps). The cron job and the morning check bracket the reset; they do not time it.
- When exactly D1 starts refusing, and whether it ever refuses writes. Reads were refused between 51 and 66 minutes after we passed the limit; writes were still accepted more than three hours after we passed 190%, at our last check.
- Whether D1 and KV share the 1,000 internal operations per request. Our mixed D1 and KV plans hit the CPU limit before either operation limit, and by the time we could re-run them KV reads were used up for the day.
- The memory limit. Requests of 160 and 200 MiB succeeded and 256 MiB failed, one request each. We do not know where the point of failure really is, or whether concurrent requests on one isolate would fail sooner.
- Fail open and fail closed, and what Error 1027 looks like. Those are route settings on a zone, and we tested
workers.devURLs only. The request limit never triggered, so we saw neither the error page nor a fail-open route.
Summary
The free plan's limits fall into three groups, and each needs a different kind of care:
- Per-request limits (subrequests, KV and D1 operations) are exact and throw an exception you can catch. Count redirects, batch D1 and KV calls, and keep a margin.
- CPU was lenient for the odd heavy request and unforgiving for steady ones: our two steady PBKDF2 runs were cut off after 4 minutes 7 seconds and 2 minutes 25 seconds, with a Cloudflare error page instead of the Worker's response. Test anything that is over 10 ms on every call under steady load before you rely on it.
- Daily allowances were enforced late or not at all: minutes late for KV, about an hour late for D1 reads, and not at all during our test for D1 writes or requests. All of them were back after the UTC day ended. Do not rely on the lateness. Count your own usage, check Cloudflare's analytics daily, and make every KV and D1 call on a hot path fail soft.
Deploy-time limits are the easy ones: they stop the deploy and say why, but check what was already uploaded when one fails.
The companies that keep DevOps Daily free. Some links are referral links.
Bitrise
Managed runners for GitHub Actions
Bitrise Build Hub runs your GitHub Actions jobs on M4 Macs and AMD Linux machines. Change runs-on and keep your workflows, secrets and logs on GitHub.
Plakar
Open-source backup and restore
Encrypted, deduplicated snapshots with instant browsing and restore, across clouds and on-prem. Open source, with developer-friendly tooling.
Atomsized
AWS platform engineering and GitOps
Design and automation for reliable AWS and Kubernetes platforms, safer delivery workflows, and preview and UAT environments your engineers can understand and own.
DigitalOcean
Cloud infrastructure for developers
Simple, reliable cloud computing designed for developers
DevDojo
Developer community & tools
Join a community of developers sharing knowledge and tools
SMTPfast
Developer-first email API
Send transactional and marketing email through a clean REST API. Detailed logs, webhooks, and embeddable signup forms in one dashboard.
Want to support DevOps Daily and reach thousands of developers?
Become a SponsorTags
Found an issue?
Related Posts
Also worth your time on this topic
Where Your Code Runs When There Is No Region
The edge compatibility tax people still warn about has mostly been paid off. What is left is stranger and more interesting: you can keep your Node imports, but you cannot keep your process. Two measured demos of what that actually costs.
AWS Security Checklist
Essential security configuration checklist for AWS cloud environments.
45-60 minutes
AWS VPC Networking Fundamentals
Explain the difference between public and private subnets in AWS VPC. How do instances in private subnets access the internet?
junior