An agent queue should slow the rush before the rush reaches your database.
On November 10, Cloudflare added a concurrency setting for individual Workflows. Use it to cap the number of running instances for a workload. If more instances arrive than can run, they queue and start as capacity becomes available. Existing runs continue if you lower the cap.
An instance cap leaves room for bursts inside a run
Start by checking how many requests one instance can send at once. For example, eight active instances that each open three concurrent requests could make 24 simultaneous requests to a downstream service. Use a separate request budget if that service enforces a strict per-second limit.
Measure time in the queue before picking a cap
Replay a small burst in staging. Record when each instance arrives, starts, and finishes. Compare the downstream error rate with the time jobs spend waiting. A cap that protects the database can still leave customers waiting too long for a result.
Cloudflare requires Wrangler 4.127.0 or newer for this setting. Put concurrency.limit in every deployment configuration. Deploying without it removes the cap. Our Codex recovery article covers how an agent resumes after an interrupted run.




