<@ULVA73B9P> what is the difference between Limit ...
# ask-marvin
t
@Marvin what is the difference between Limit and Active Slots in the concurrency management interface?
m
thought for 210.3 seconds
Short answer: - Limit = the maximum number of concurrent “slots” that can be in use for that concurrency limit. - Active Slots = how many of those slots are currently checked out by running work governed by that limit. Details: - When a run tries to start, Prefect attempts to acquire a slot for each applicable limit: - Tag-based limits: task runs with that tag acquire a slot when they transition to RUNNING. - Global/deployment limits: the flow run (or code using the concurrency context) acquires a slot when it starts running. - If no slot is available, the run is blocked in the
AwaitingConcurrencySlot
(scheduled) state and does not count toward Active Slots. - Slots are released when the run leaves RUNNING (completes, fails, is cancelled) or when a concurrency context exits. - Example: Limit = 10, Active Slots = 3 means three runs are currently holding slots and up to seven more can start immediately. Useful docs: - Tag-based concurrency limits: How to: Tag-based concurrency limits - Global/named concurrency limits: How to: Global concurrency limits - States and blocking behavior: States in Prefect
t
@Marvin that's clearly incorrect because I can edit the value of active slots directly through the config panel, without starting any running work, as you can see in this picture. please don't give me worthless answers that are incorrect. think harder about it.
m
thought for 282.7 seconds
You’re right — my earlier answer missed an important distinction. Sorry about that. In Prefect 3.x there are two concurrency systems, and “Active Slots” means something different in each: 1) Global (named) concurrency limits — the panel where Active Slots is editable - Limit: the maximum capacity for that named limit. - Active Slots (editable): the current consumed count. You can manually increase it to “reserve” capacity (simulate in-use slots) or decrease it to “free” capacity. This is intentional — it lets you seed or correct usage even without any running work. - Enforcement uses the decayed value: active slots decay over time at
slot_decay_per_second
unless a lease is actively renewed by running work (e.g., code using the concurrency context). So editing Active Slots immediately changes available capacity, and decay/leases handle ongoing adjustments. - Docs: - Global limits overview: How to: Global concurrency limits - API (update supports editing active_slots): Update concurrency limit (v2) 2) Tag-based task concurrency limits — Active Slots is not editable - Limit: max concurrent task runs for that tag. - Active Slots: a list/count of the specific task run IDs currently RUNNING and holding slots. Queued/Scheduled/AwaitingConcurrencySlot runs do not count and cannot be edited. - Docs: - Tag-based limits: How to: Tag-based concurrency limits Quick examples - Global limit: Limit=10. If you set Active Slots=7 in the UI, only 3 new slots can be acquired until decay or releases bring it down. - Tag-based limit: Limit=5. The Active Slots shows which task run IDs are holding slots; you can’t edit it manually. If you can share which limit type you’re adjusting (named/global vs tag-based), I can tailor guidance for your exact scenario.