|
| 1 | +--- |
| 2 | +section: cre |
| 3 | +date: Last Modified |
| 4 | +title: "Testing Production Limits" |
| 5 | +metadata: |
| 6 | + description: "Test workflows against production limits locally: use the --limits flag to enforce, disable, or customize simulation limits before deploying." |
| 7 | + datePublished: "2026-03-19" |
| 8 | + lastModified: "2026-03-19" |
| 9 | +--- |
| 10 | + |
| 11 | +import { Aside, CodeSample } from "@components" |
| 12 | + |
| 13 | +Simulation limits let you test your workflows against production constraints locally before deploying. By enforcing the same quotas that apply in production, you can catch violations early and avoid surprises at deploy time. |
| 14 | + |
| 15 | +## Why use simulation limits |
| 16 | + |
| 17 | +When you simulate a workflow, the CLI can enforce the same [service quotas](/cre/service-quotas) that your workflow will be subject to in production. This helps you: |
| 18 | + |
| 19 | +- **Catch violations early**: Identify workflows that exceed timeout, memory, or rate limits before deploying. |
| 20 | +- **Match production behavior**: Ensure your local simulation mirrors how your workflow will run on the network. |
| 21 | +- **Avoid surprises at deploy time**: Confidently deploy knowing your workflow operates within quota boundaries. |
| 22 | + |
| 23 | +## Using the `--limits` flag |
| 24 | + |
| 25 | +The `--limits` flag controls how simulation limits are enforced. It supports three modes: |
| 26 | + |
| 27 | +### Default limits (default behavior) |
| 28 | + |
| 29 | +By default, the simulator enforces embedded production limits. You do not need to pass any flag: |
| 30 | + |
| 31 | +```bash |
| 32 | +cre workflow simulate my-workflow --target staging-settings |
| 33 | +``` |
| 34 | + |
| 35 | +This is equivalent to explicitly passing `--limits default`: |
| 36 | + |
| 37 | +```bash |
| 38 | +cre workflow simulate my-workflow --limits default --target staging-settings |
| 39 | +``` |
| 40 | + |
| 41 | +### No limits |
| 42 | + |
| 43 | +To disable all limit enforcement during simulation, use `--limits none`: |
| 44 | + |
| 45 | +```bash |
| 46 | +cre workflow simulate my-workflow --limits none --target staging-settings |
| 47 | +``` |
| 48 | + |
| 49 | +<Aside type="caution" title="Use with care"> |
| 50 | + Running without limits is useful for debugging, but your workflow may still fail when deployed if it exceeds |
| 51 | + production quotas. Always validate with limits enabled before deploying. |
| 52 | +</Aside> |
| 53 | + |
| 54 | +### Custom limits |
| 55 | + |
| 56 | +You can provide a custom limits file to override specific values: |
| 57 | + |
| 58 | +```bash |
| 59 | +cre workflow simulate my-workflow --limits ./my-limits.json --target staging-settings |
| 60 | +``` |
| 61 | + |
| 62 | +See [Customizing limits](#customizing-limits) for how to create a custom limits file. |
| 63 | + |
| 64 | +## Viewing default limits |
| 65 | + |
| 66 | +Use the [`cre workflow limits export`](/cre/reference/cli/workflow#cre-workflow-limits) command to inspect the default production limits: |
| 67 | + |
| 68 | +```bash |
| 69 | +cre workflow limits export |
| 70 | +``` |
| 71 | + |
| 72 | +This outputs the default limits as JSON to stdout. You can redirect the output to a file: |
| 73 | + |
| 74 | +```bash |
| 75 | +cre workflow limits export > my-limits.json |
| 76 | +``` |
| 77 | + |
| 78 | +## Customizing limits |
| 79 | + |
| 80 | +To customize limits for simulation: |
| 81 | + |
| 82 | +1. **Export the defaults** to a JSON file: |
| 83 | + |
| 84 | + ```bash |
| 85 | + cre workflow limits export > my-limits.json |
| 86 | + ``` |
| 87 | + |
| 88 | +2. **Edit the JSON file** to adjust the values you want to change. For example, you might increase the execution timeout or HTTP call limit for testing purposes. |
| 89 | + |
| 90 | +3. **Pass the custom file** to the simulator: |
| 91 | + |
| 92 | + ```bash |
| 93 | + cre workflow simulate my-workflow --limits ./my-limits.json --target staging-settings |
| 94 | + ``` |
| 95 | + |
| 96 | +<Aside type="note" title="Custom limits are for simulation only"> |
| 97 | + Custom limits only affect local simulation. Production deployments always use the platform-enforced quotas listed on |
| 98 | + the [Service Quotas](/cre/service-quotas) page. To change production limits, see [Requesting limit |
| 99 | + increases](#requesting-limit-increases). |
| 100 | +</Aside> |
| 101 | + |
| 102 | +## Default limit values |
| 103 | + |
| 104 | +The default limits enforced during simulation match the production quotas documented on the [Service Quotas](/cre/service-quotas) page. Use `cre workflow limits export` to inspect the exact values applied to your simulations. |
| 105 | + |
| 106 | +## Requesting limit increases |
| 107 | + |
| 108 | +If your workflow requires higher limits than the defaults, you can request a limit increase: |
| 109 | + |
| 110 | +1. Go to [cre.chain.link](https://cre.chain.link) and log in to your account. |
| 111 | +2. Click **Help** in the sidebar. |
| 112 | +3. Set **Issue Type** to **Other**. |
| 113 | +4. In the **Description** field, include: |
| 114 | + - Which limit you need increased |
| 115 | + - The desired value |
| 116 | + - The reason for the increase |
| 117 | + |
| 118 | +<Aside type="tip" title="Be specific"> |
| 119 | + Include the quota key from the [Service Quotas](/cre/service-quotas) page (e.g., `PerWorkflow.ExecutionTimeout`) in |
| 120 | + your request to help the team process it faster. |
| 121 | +</Aside> |
| 122 | + |
| 123 | +## Next steps |
| 124 | + |
| 125 | +- **Service quotas reference**: See the full [Service Quotas](/cre/service-quotas) page for all quota keys and values. |
| 126 | +- **Simulating workflows**: Learn more about the simulation environment in [Simulating Workflows](/cre/guides/operations/simulating-workflows). |
| 127 | +- **CLI reference**: See the [`cre workflow simulate`](/cre/reference/cli/workflow#cre-workflow-simulate) and [`cre workflow limits`](/cre/reference/cli/workflow#cre-workflow-limits) command references for all available flags. |
| 128 | +- **Deploy your workflow**: Once validated, see [Deploying Workflows](/cre/guides/operations/deploying-workflows). |
0 commit comments