Skip to content
Cloudflare Docs

Limits

Limits that apply to authoring, deploying, and running Workflows are detailed below.

Many limits are inherited from those applied to Workers scripts and as documented in the Workers limits documentation.

FeatureWorkers FreeWorkers Paid
Workflow class definitions per script3MB max script size per Worker size limits10MB max script size per Worker size limits
Total scripts per account100500 (shared with Worker script limits
Compute time per step 110 seconds30 seconds (default) / configurable to 5 minutes of active CPU time
Duration (wall clock) per step 1UnlimitedUnlimited - for example, waiting on network I/O calls or querying a database
Maximum persisted state per step1MiB (2^20 bytes)1MiB (2^20 bytes)
Maximum event payload size1MiB (2^20 bytes)1MiB (2^20 bytes)
Maximum state that can be persisted per Workflow instance100MB1GB
Maximum length of a Workflow ID 264 characters64 characters
Maximum step.sleep duration365 days (1 year) 3365 days (1 year) 3
Maximum steps per Workflow 41024 31024 3
Maximum Workflow executions100,000 per day shared with Workers daily limitUnlimited
Concurrent Workflow instances (executions) per account254500 3
Maximum Workflow instance creation rate100 per 10 seconds 35100 per 10 seconds 35
Maximum number of queued instances10,000 3100,000 3
Retention limit for completed Workflow state3 days30 days 6
Maximum length of a Workflow ID 264 characters64 characters

Increasing Workflow CPU limits

Workflows are Worker scripts, and share the same per invocation CPU limits as any Workers do. Note that CPU time is active processing time: not time spent waiting on network requests, storage calls, or other general I/O, which don't count towards your CPU time or Workflows compute consumption.

By default, the maximum CPU time per Workflow invocation is set to 30 seconds, but can be increased for all invocations associated with a Workflow definition by setting limits.cpu_ms in your Wrangler configuration:

{
// ...rest of your configuration...
"limits": {
"cpu_ms": 300000, // 300,000 milliseconds = 5 minutes
},
// ...rest of your configuration...
}

To learn more about CPU time and limits, review the Workers documentation.

Footnotes

  1. A Workflow instance can run forever, as long as each step does not take more than the CPU time limit and the maximum number of steps per Workflow is not reached. 2

  2. Match pattern: ^[a-zA-Z0-9_][a-zA-Z0-9-_]*$ 2

  3. This limit will be reviewed and revised during the open beta for Workflows. Follow the Workflows changelog for updates. 2 3 4 5 6 7 8 9

  4. step.sleep do not count towards the max. steps limit

  5. Workflows will return a HTTP 429 rate limited error if you exceed the rate of new Workflow instance creation. 2

  6. Workflow state and logs will be retained for 3 days on the Workers Free plan and for 7 days on the Workers Paid plan.