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
Anna Geller
02/23/2022, 10:35 AM
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
Vipul
02/23/2022, 11:03 AM
Hey, @Anna Geller, thanks for coming back. I see they are stuck in the Scheduled state
a
Anna Geller
02/23/2022, 11:09 AM
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
Vipul
02/23/2022, 11:10 AM
Let me read this
👍 1
Vipul
02/23/2022, 11:10 AM
Thanks Anna, you are always helpful
Vipul
02/23/2022, 1:56 PM
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
Anna Geller
02/23/2022, 2:00 PM
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.