Louis Lahillonne
04/01/2026, 4:26 PMConcurrency lease renewal failed - slots are no longer reserved. Terminating execution to prevent over-allocation.
Crash detected! Execution was cancelled by the runtime environment.
Finished in state Crashed('Execution was cancelled by the runtime environment.')
Crash detected! Execution was cancelled by the runtime environment.
Finished in state Crashed('Execution was cancelled by the runtime environment.')
Crash detected! Execution was cancelled by the runtime environment.
Finished in state Crashed('Execution was cancelled by the runtime environment.')
Crash detected! Execution was cancelled by the runtime environment.
Finished in state Crashed('Execution was cancelled by the runtime environment.')
Crash detected! Execution was cancelled by the runtime environment.
Finished in state Crashed('Execution was cancelled by the runtime environment.')
Crash detected! Execution was cancelled by the runtime environment.
Finished in state Crashed('Execution was cancelled by the runtime environment.')Marvin
04/01/2026, 4:26 PMMarvin
04/01/2026, 4:28 PMconcurrency(...) context in your own code and cancellations are undesirable on transient blips, run it in non-strict mode:
from prefect.concurrency.asyncio import concurrency
async with concurrency(
"my-limit",
occupy=1,
strict=False # continue execution if a renewal blips
):
await do_work()
Note: This allows execution to continue if a renewal fails temporarily, which can momentarily exceed the limit.
- If you suspect event loop blocking:
- Offload blocking work:
import anyio
async def run_blocking(fn, *args, **kwargs):
return await anyio.to_thread.run_sync(fn, *args, **kwargs)
- Or ensure CPU-heavy steps run in a separate process pool.
- Ensure your workers aren’t being killed or rescheduled mid-run (K8s eviction, HPA scale-down, node rotations).
- Upgrade to the latest 3.x release and enable DEBUG logs to surface renewal errors:
PREFECT_LOGGING_LEVEL=DEBUG
Helpful docs
- Global Concurrency Limits (concepts)
- How to use Global Concurrency and Rate Limits
A few questions to pinpoint root cause
- Are you using deployment concurrency limits on this deployment, or global/user-defined limits via a concurrency(...) context?
- Prefect version, worker type (Kubernetes, Docker, process), and where it’s running?
- Roughly how long after the run starts does the crash occur?
- Do your worker logs show connection errors or worker restarts around that time?
If you can share a short snippet of your deployment configuration and any worker log lines near the failure, I can help narrow this down further and recommend a targeted fix.