Limits (28)·续
Outbound WebSocket connections also count toward this limit.
Once response headers arrive for a connection, it no longer counts toward the six-connection limit. This means a Worker can have many connections open simultaneously, as long as no more than six are in the initial "waiting for headers" phase at the same time. If a seventh connection is attempted while six are already waiting for headers, it is queued until one of the existing connections receives its response headers.
If you use fetch() but do not need the response body, calling response.body.cancel() is still good practice to free memory:
src/index.jsjs
const response = await fetch(url);
// Only read the response body for successful responses
if (response.status <= 299) {
// Call response.json(), response.text() or otherwise process the body
} else {
// Explicitly cancel it
response.body.cancel();
}
src/index.tsts
const response = await fetch(url);
// Only read the response body for successful responses
if (response.status <= 299) {
// Call response.json(), response.text() or otherwise process the body
} else {
// Explicitly cancel it
response.body.cancel();
}
Note
The runtime measures simultaneous open connections from the top-level request. Workers triggered via Service bindings share the same connection limit.
Environment variables
| Limit | Workers Free | Workers Paid |
|---|---|---|
| Variables per Worker (secrets + text) | 64 | 128 |
| Variable size | 5 KB | 5 KB |
| Variables per account | No limit | No limit |
Worker size
| Limit | Workers Free | Workers Paid |
|---|---|---|
| Worker size (uncompressed) | 64 MiB | 64 MiB |
There is no compressed size limit. Only the uncompressed bundle size counts.
Larger Worker bundles can impact startup time. To check your Worker bundle size:
wrangler deploy --outdir bundled/ --dry-run
Total Upload: 259.61 KiB / gzip: 47.23 KiB
The Total Upload value is your uncompressed bundle size. The gzip value is shown for reference but is not a limit.
To reduce Worker size:
- Remove unnecessary dependencies and packages.
- Store configuration files, static assets, and binary data in KV, R2, D1, or Workers Static Assets instead of bundling them.
- Split functionality across multiple Workers using Service bindings.
Worker startup time
| Limit | Value |
|---|---|
| Startup time | 1 second |
A Worker must parse and execute its global scope (top-level code outside of handlers) within 1 second. Larger bundles and expensive initialization code in global scope increase startup time.
When the platform rejects a deployment because the Worker exceeds the startup time limit, the validation returns the error Script startup exceeded CPU time limit (error code 10021). Wrangler automatically generates a CPU profile that you can import into Chrome DevTools or open in VS Code. Refer to wrangler check startup for more details.
To measure startup time, run npx wrangler@latest deploy or npx wrangler@latest versions upload. Wrangler reports startup_time_ms in the output.
To reduce startup time, avoid expensive work in global scope. Move initialization logic into your handler or to build time. For example, generating or consuming a large schema at the top level is a common cause of exceeding this limit.
Need a higher limit?
To request an adjustment to a limit, complete the Limit Increase Request Form ↗︎. If the limit can be increased, Cloudflare will contact you with next steps.
Number of Workers
| Limit | Workers Free | Workers Paid |
|---|---|---|
| Workers per account | 100 | 500<sup>1</sup> |
If you are building a platform where your end customers deploy their own sites or applications, use Workers for Platforms, which runs an unlimited number of user Workers.
Routes and domains
| Limit | Value |
|---|---|
| Routes per zone | 1,000 |
Routes per zone (wrangler dev --remote) |
50 |
| Custom domains per zone | 100 |
| Routed zones per Worker | 1,000 |
Routes with wrangler dev --remote
When you run a remote development session using the --remote flag, Cloudflare enforces a limit of 50 routes per zone. The Quick Editor in the Cloudflare dashboard also uses wrangler dev --remote, so the same limit applies.
If your zone has more than 50 routes, you cannot run a remote session until you remove routes to get under the limit.
If you require more than 1,000 routes or 1,000 routed zones per Worker, consider using Workers for Platforms. If you require more than 100 custom domains per zone, consider using a wildcard route.
Cache API limits
| Feature | Workers Free | Workers Paid |
|---|---|---|
| Maximum object size | 512 MB | 512 MB |
| Calls per request | 50 | 1,000 |
Calls per request is the number of put(), match(), or delete() Cache API calls per request. This shares the same quota as subrequests (fetch()).
Note
The size of chunked response bodies (Transfer-Encoding: chunked) is not known in advance. Calling .put() with such a response blocks subsequent .put() calls until the current one completes.
Log size
| Limit | Value |
|---|---|
| Log data per request | 256 KB |
This limit covers all data emitted via console.log() statements, exceptions, request metadata, and headers for a single request. After exceeding this limit, the system does not record additional context for that request in logs, tail logs, or Tail Workers.
Refer to the Workers Trace Event Logpush documentation for limits on fields sent to Logpush destinations.
Image Resizing with Workers
Refer to the Image Resizing documentation for limits that apply when using Image Resizing with Workers.
Static Assets
| Limit | Workers Free | Workers Paid |
|---|---|---|
| Files per Worker version | 20,000 | 100,000 |
| Individual file size | 25 MiB | 25 MiB |
_headers rules |
100 | 100 |
_headers characters per line |
2,000 | 2,000 |
_redirects static redirects |
2,000 | 2,000 |
_redirects dynamic redirects |
100 | 100 |
_redirects total |
2,100 | 2,100 |
_redirects characters per rule |
1,000 | 1,000 |
Note
To use the increased file count limits in Wrangler, you must use version 4.34.0 or higher.
Unbound and Bundled plan limits
Note
Unbound and Bundled plans have been deprecated and are no longer available for new accounts.
If your Worker is on an Unbound plan, limits match the Workers Paid plan.
If your Worker is on a Bundled plan, limits match the Workers Paid plan with these exceptions:
| Feature | Bundled plan limit |
|---|---|
| Subrequests | 50/request |
| CPU time (HTTP requests) | 50 ms |
| CPU time (Cron Triggers) | 50 ms |
| Cache API calls/request | 50 |
Bundled plan Workers have no duration limits for Cron Triggers, Durable Object Alarms, or Queue Consumers.
Wall time limits by invocation type
Wall time (also called wall-clock time) is the total elapsed time from the start to end of an invocation, including time spent waiting on network requests, I/O, and other asynchronous operations. This is distinct from CPU time, which only measures time the CPU spends actively executing your code.
The following table summarizes the wall time limits for different types of Worker invocations across the developer platform:
| Invocation type | Wall time limit | Details |
|---|---|---|
| Incoming HTTP request | Unlimited | No hard limit while the client remains connected. Workers requests are subject to the grace period for runtime updates. A Worker that is still streaming a response body remains active. waitUntil() extends execution for up to 30 seconds after the response or disconnect. |
| Cron Triggers | 15 minutes | Scheduled Workers have a maximum wall time of 15 minutes per invocation. |
| Queue consumers | 15 minutes | Each consumer invocation has a maximum wall time of 15 minutes. |
| Durable Object alarm handlers | 15 minutes | Alarm handler invocations have a maximum wall time of 15 minutes. |
| Durable Objects (RPC / HTTP) | Unlimited | No hard limit while the caller stays connected to the Durable Object. Durable Objects remain active while a request, RPC call, response stream, WebSocket, or pending I/O is in flight. |
| Workflows (per step) | Unlimited | Each step can run for an unlimited wall time. Individual steps are subject to the configured CPU time limit. |
Related resources
Footnotes
- If you need a higher Worker limit, use Workers for Platforms. ↩ ↩<sup>2</sup>
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/platform/limits/#page","headline":"Limits","description":"Cloudflare Workers plan and platform limits.","url":"https://developers.cloudflare.com/workers/platform/limits/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/platform/limits/og.png?v=58be33e8c39614b7","dateModified":"2026-10-12","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Workers plans and pricing information. title: Pricing image: https://developers.cloudflare.com/workers/platform/pricing/og.png?v=6c82602c81fb72bf
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt
Use this file to discover all available pages before exploring further.
Docs