We have a few tasks that are hanging and taking th...
# prefect-community
We have a few tasks that are hanging and taking the concurrency limit, but their flow has been cancelled. How do we cancel those tasks?
Hey @Idan is this prefect 1 or prefect 2? assuming it's prefect 1 you can query the graphql api to clear the stuck task runs https://discourse.prefect.io/t/how-can-i-remove-flow-task-runs-stuck-in-a-running-or-canceling-state/1855. If this is for prefect 2 could you provide some more details about how the flow/tasks were executed?
Prefect 2. Just a basic flow with
defined, which was cancelled a bit after execution. The concurrency limit was reached, and after cancelling the flow run, the tasks were still in
state, which I'm guessing the concurrency limit was frozen. We then also tried deleting the entire flow run (hurray, no more hanging tasks), but that did not fix the issue.
For now, we ended up deleting the concurrency limit and recreating it
Looks like we have an open issue for this on our repo https://github.com/PrefectHQ/prefect/issues/7732, there's also an open pull request to address which should ideally get pushed out soon