Lee Trout
09/22/2025, 1:15 AMecs:push
to ecs
worker pools and now my global concurrency limit in prefect cloud is being ignored and I am running out of vcpu. Is this a known issue? do i need to recreate the global concurrency limit since i made a new workpool or is this a coincidence it broke after this change?Marvin
09/22/2025, 1:16 AMMarvin
09/22/2025, 1:24 AMprefect global-concurrency-limit ls
prefect global-concurrency-limit inspect <limit-name>
prefect global-concurrency-limit enable <limit-name>
Docs: Global concurrency limits
2) Confirm your code is acquiring the GCL
- Sync:
from prefect.concurrency.sync import concurrency
with concurrency("<limit-name>"):
# your work
- Async:
from prefect.concurrency.asyncio import concurrency
async with concurrency("<limit-name>"):
# your work
If your flows don’t acquire the limit by name, the GCL won’t throttle anything.
3) Set a concurrency limit on the new work pool (if you were using pool-level limits before)
prefect work-pool set-concurrency-limit "<your-ecs-pool-name>" 10
CLI ref: Work pool CLI
4) (Optional) If you were relying on deployment-level concurrency, double-check that setting on your deployment after the migration.
Not a known bug
- We’re not tracking an issue where ecs pools ignore GCLs. The only related reports we’ve seen are about scheduling behavior on ecs:push, not GCL enforcement.
If you can share:
- The GCL name you expect to be enforced and the output of prefect global-concurrency-limit inspect <name>
- Whether your flow code acquires that GCL
- Whether you’ve set a concurrency limit on the new ecs work pool
…I can help pinpoint which of the above is causing the spike in vCPU.Lee Trout
09/22/2025, 1:59 AMLee Trout
09/22/2025, 3:30 PMMarvin
09/22/2025, 3:30 PMMarvin
09/22/2025, 3:32 PM