Quick Question, I have recently seen an issue wher...
# ask-community
v
Quick Question, I have recently seen an issue where the Agent does not pick up the triggered flows. The Prefect Server and Prefect Agent are both running & the labels on the Flow versus the Agent match, so that is not the issue. Is there anything obvious that I need to check? Appreciate the help. I am running on version 0.14.8
a
When you say that the agent doesn't pick up the flow, does it mean that the flow runs get stuck in a Scheduled state or do you rather see them being stuck in a Submitted state?
v
Hey, @Anna Geller, thanks for coming back. I see they are stuck in the Scheduled state
a
This is a common issue and we have a checklist of things you can try to debug the issue. Can you check if any of this helps? I understand the labels seem matching but e.g. you can check if the labels on run config is a list, not a string, agent health, and more.
v
Let me read this
👍 1
Thanks Anna, you are always helpful
Thanks, @Anna Geller. I believe it might be an edge case of too many scheduled flows. Is there a way using the graphql to remove the flow which is a schedule but did not run
a
Nice that you figured it out. You can definitely do that! You can first query for flows in a Scheduled state and then for each execute the delete_flow_run mutation. There is an example script here that you can use as a basis (you would need to adjust a little). But you should also have the option to clear late runs directly from the UI. I'm pretty sure this should work in Prefect Server as well, not only in Cloud.
v
Thanks Anna