<@ULVA73B9P> cancelling flows through the ui doesn...
# ask-marvin
r
@Marvin cancelling flows through the ui doesnt release concurrency
m
It seems you're experiencing issues with concurrency slots not being released when canceling flows through the UI in Prefect. This is a known issue, particularly when dealing with Kubernetes jobs or specific concurrency strategies. Here are some insights: 1. Concurrency Limits and Cancellation: There have been reports of concurrency slots not being released when a flow run is canceled, especially in Kubernetes environments. This can lead to tasks remaining in a "canceled" state but still occupying concurrency slots. More details can be found in this GitHub issue. 2. Collision Strategies: When using the
CANCEL_NEW
collision strategy, there are cases where flow runs exceed the defined concurrency limit and do not cancel as expected. This issue might be related to additional concurrency limits at the worker or work pool level interfering with the cancellation process. More information is available in this GitHub issue. 3. Infrastructure and Scope: The Prefect documentation notes that if the infrastructure for a flow run does not support cancellation or if the identifier scope does not match, cancellation might not work as intended. This can lead to issues where concurrency slots are not released. You can read more about this in the Prefect documentation. If you're facing persistent issues, you might want to consider removing additional concurrency limits on workers or work pools as a temporary workaround. Additionally, keeping an eye on the Prefect GitHub repository for updates or fixes related to these issues could be beneficial.