﻿# Prefect strict acquisition does not activate an inactive limit

Prefect strict acquisition rejects a missing named limit but does not activate an existing inactive limit; lease-renewal failure handling is another explicit choice.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-prefect-strict-inactive-limit/
Language: en

## Diagnose strict code that still does not block

A workflow uses `strict=True`, yet operations exceed the intended database occupancy. The named limit may exist but be inactive. Prefect's [application guide](https://www.prefect.io/docs/v3/how-to-guides/workflows/global-concurrency-limits) explicitly says strict acquisition fails for a missing limit and does not enforce an inactive one. A restrictive-looking argument is therefore not a substitute for inspecting the server-side limit's state.

## Separate existence from activation

The [concept guide](https://www.prefect.io/docs/v3/concepts/global-concurrency-limits) defines an inactive limit as a configured object that neither occupies slots nor blocks execution. This permits temporarily disabling enforcement without deleting configuration. Check the active flag as well as the name and capacity. If a maintenance action disabled the limit, restoring strict client code alone does not restore the resource boundary. The required repair concerns the actual configured object's intended state.

## Read lease-renewal behavior independently

Occupied concurrency slots use leases that clients renew. If renewal stops, slots can eventually be released even though outside work may still exist. Current documentation distinguishes default warning-and-continue behavior from strict errors and exposes `raise_on_lease_renewal_failure` separately. The [current source](https://raw.githubusercontent.com/PrefectHQ/prefect/main/src/prefect/concurrency/sync.py) passes that value independently. Do not assume a decision about missing-limit acquisition completely describes how a long-running operation reacts to connectivity loss.

## Keep local failure distinct from external rollback

An error in the client wrapper does not establish that a previously submitted remote operation disappeared. For a long model or conversion job, preserve its own operation identity and completion observation. If slot enforcement is essential throughout execution, examine the work's response to cancellation or process failure as well as the acquisition setting. A lease mechanism accounts for capacity ownership; the receiving service still owns the external job's actual state.

## Verify the configurations you intend to support

Use a harmless held operation to compare an active limit, an inactive limit and a missing name. Then evaluate renewal-failure behavior in a controlled environment if it matters to the workload. [Task contracts](/journal/learn-codex-task-contract/) define the permitted resource use; [tool observations](/journal/learn-codex-tool-observation/) establish what was enforced. Record the installed revision because reference signatures can lag current source. A dependable explanation names the effective limit state and runtime policy, rather than simply saying strict mode was enabled.
