Skip to content
Cloudflare Docs

Limits

Account plan limits

FeatureWorkers FreeWorkers Paid
Requests100,000/dayNo limit
CPU time10 ms5 min
Memory128 MB128 MB
Subrequests50/request10,000/request
Simultaneous outgoing
connections/request
66
Environment variables64/Worker128/Worker
Environment variable
size
5 KB5 KB
Worker size3 MB10 MB
Worker startup time1 second1 second
Number of Workers1100500
Number of Cron Triggers
per account
5250
Number of Static Asset files per Worker version20,000100,000
Individual Static Asset file size25 MiB25 MiB

1 If you reach this limit, consider using Workers for Platforms.


Request and response limits

LimitValue
URL size16 KB
Request header size128 KB (total)
Response header size128 KB (total)
Response body sizeNo enforced limit

Request body size limits depend on your Cloudflare account plan, not your Workers plan. Requests exceeding these limits return a 413 Request entity too large error.

Cloudflare PlanMaximum request body size
Free100 MB
Pro100 MB
Business200 MB
Enterprise500 MB (by default)

Enterprise customers can contact their account team or Cloudflare Support for a higher request body limit.

Cloudflare does not enforce response body size limits. CDN cache limits apply: 512 MB for Free, Pro, and Business plans, and 5 GB for Enterprise.


CPU time

CPU time measures how long the CPU spends executing your Worker code. Waiting on network requests (such as fetch() calls, KV reads, or database queries) does not count toward CPU time.

LimitWorkers FreeWorkers Paid
CPU time per HTTP request10 ms5 min (default: 30 seconds)
CPU time per Cron Trigger10 ms30 seconds (< 1 hour interval)
15 min (>= 1 hour interval)

Most Workers consume very little CPU time. The average Worker uses approximately 2.2 ms per request. Heavier workloads that handle authentication, server-side rendering, or parse large payloads typically use 10-20 ms.

Each isolate has some built-in flexibility to allow for cases where your Worker infrequently runs over the configured limit. If your Worker starts hitting the limit consistently, its execution will be terminated according to the limit configured.

Error: exceeded CPU time limit

When a Worker exceeds its CPU time limit, Cloudflare returns Error 1102 to the client with the message Worker exceeded resource limits. In the dashboard, this appears as Exceeded CPU Time Limits under Metrics > Errors > Invocation Statuses. In analytics and Logpush, the invocation outcome is exceededCpu.

To resolve a CPU time limit error:

  1. Increase the CPU time limit — On the Workers Paid plan, you can raise the limit from the default 30 seconds up to 5 minutes (300,000 ms). Set this in your Wrangler configuration or in the dashboard.
  2. Optimize your code — Use CPU profiling with DevTools to identify CPU-intensive sections of your code.
  3. Offload work — Move expensive computation to Durable Objects or process data in smaller chunks across multiple requests.

Increasing the CPU time limit

On the Workers Paid plan, you can increase the maximum CPU time from the default 30 seconds to 5 minutes (300,000 ms).

{
// ...rest of your configuration...
"limits": {
"cpu_ms": 300000, // default is 30000 (30 seconds)
},
// ...rest of your configuration...
}

You can also change this in the dashboard: go to Workers & Pages > select your Worker > Settings > adjust the CPU time limit.

Monitoring CPU usage


Memory

LimitValue
Memory per isolate128 MB

Each isolate can consume up to 128 MB of memory, including the JavaScript heap and WebAssembly allocations. This limit is per-isolate, not per-invocation. A single isolate can handle many concurrent requests.

When an isolate exceeds 128 MB, the Workers runtime lets in-flight requests complete and creates a new isolate for subsequent requests. During extremely high load, the runtime may cancel some incoming requests to maintain stability.

Error: exceeded memory limit

When a Worker exceeds its memory limit, Cloudflare returns Error 1102 to the client with the message Worker exceeded resource limits. In the dashboard, this appears as Exceeded Memory under Metrics > Errors > Invocation Statuses. In analytics and Logpush, the invocation outcome is exceededMemory.

You may also see the runtime error Memory limit would be exceeded before EOF when attempting to buffer a response body that exceeds the limit.

To resolve a memory limit error:

  1. Stream request and response bodies — Use TransformStream or node:stream instead of buffering entire payloads in memory.
  2. Avoid large in-memory objects — Store large data in KV, R2, or D1 instead of holding it in Worker memory.
  3. Profile memory usage — Use memory profiling with DevTools locally to identify leaks and high-memory allocations.

To view memory errors in the dashboard:

  1. Go to Workers & Pages.

    Go to Workers & Pages
  2. Select the Worker you want to investigate.

  3. Under Metrics, select Errors > Invocation Statuses and examine Exceeded Memory.


Duration

Duration measures wall-clock time from start to end of a Worker invocation. There is no hard limit on duration for HTTP-triggered Workers. As long as the client remains connected, the Worker can continue processing, making subrequests, and setting timeouts.

Trigger typeDuration limit
HTTP requestNo limit
Cron Trigger15 min
Durable Object Alarm15 min
Queue Consumer15 min

When the client disconnects, all tasks associated with that request are canceled. Use event.waitUntil() to delay cancellation for another 30 seconds or until the promise you pass to waitUntil() completes.


Daily requests

Workers scale automatically across the Cloudflare global network. There is no general limit on requests per second.

Accounts on the Workers Free plan have a daily request limit of 100,000 requests, resetting at midnight UTC. When a Worker exceeds this limit, Cloudflare returns Error 1027.

Route modeBehavior
Fail openBypasses the Worker. Requests behave as if no Worker is configured.
Fail closedReturns a Cloudflare 1027 error page. Use this for security-critical Workers.

You can configure the fail mode by toggling the corresponding route.


Subrequests

A subrequest is any request a Worker makes using the Fetch API or to Cloudflare services like R2, KV, or D1.

LimitWorkers FreeWorkers Paid
Subrequests per invocation5010,000 (up to 10M)
Subrequests to internal services1,000Matches configured limit (default 10,000)

Each subrequest in a redirect chain counts against this limit. The total number of subrequests may exceed the number of fetch() calls in your code. You can change the subrequest limit per Worker using the limits configuration in your Wrangler configuration file.

There is no set time limit on individual subrequests. As long as the client remains connected, the Worker can continue making subrequests. When the client disconnects, all tasks are canceled. Use event.waitUntil() to delay cancellation for up to 30 seconds.

Worker-to-Worker subrequests

Use Service Bindings to send requests from one Worker to another on your account without going over the Internet.

Using global fetch() to call another Worker on the same zone without service bindings fails. Workers accept requests sent to a Custom Domain.


Simultaneous open connections

Each Worker invocation can open up to six simultaneous connections. The following API calls count toward this limit:

Outbound WebSocket connections also count toward this limit.

Once six connections are open, the runtime queues additional attempts until an existing connection closes. The runtime may close stalled connections (those not actively reading or writing) with a Response closed due to connection limit exception.

If you use fetch() but do not need the response body, call response.body.cancel() to free the connection:

TypeScript
const response = await fetch(url);
// Only read the response body for successful responses
if (response.statusCode <= 299) {
// Call response.json(), response.text() or otherwise process the body
} else {
// Explicitly cancel it
response.body.cancel();
}

If the system detects a deadlock (pending connection attempts with no in-progress reads or writes), it cancels the least-recently-used connection to unblock the Worker.


Environment variables

LimitWorkers FreeWorkers Paid
Variables per Worker (secrets + text)64128
Variable size5 KB5 KB
Variables per accountNo limitNo limit

Worker size

LimitWorkers FreeWorkers Paid
After compression (gzip)3 MB10 MB
Before compression64 MB64 MB

Larger Worker bundles can impact startup time. To check your compressed bundle size:

Terminal window
wrangler deploy --outdir bundled/ --dry-run
# Output will resemble the below:
Total Upload: 259.61 KiB / gzip: 47.23 KiB

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

LimitValue
Startup time1 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.


Number of Workers

LimitWorkers FreeWorkers Paid
Workers per account100500

If you need more than 500 Workers, consider using Workers for Platforms.


Routes and domains

LimitValue
Routes per zone1,000
Routes per zone (wrangler dev --remote)50
Custom domains per zone100
Routed zones per Worker1,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

FeatureWorkers FreeWorkers Paid
Maximum object size512 MB512 MB
Calls per request501,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()).


Log size

LimitValue
Log data per request256 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

LimitWorkers FreeWorkers Paid
Files per Worker version20,000100,000
Individual file size25 MiB25 MiB
_headers rules100100
_headers characters per line2,0002,000
_redirects static redirects2,0002,000
_redirects dynamic redirects100100
_redirects total2,1002,100
_redirects characters per rule1,0001,000

Unbound and Bundled plan limits

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:

FeatureBundled plan limit
Subrequests50/request
CPU time (HTTP requests)50 ms
CPU time (Cron Triggers)50 ms
Cache API calls/request50

Bundled plan Workers have no duration limits for Cron Triggers, Durable Object Alarms, or Queue Consumers.