Why would a flow could be stuck in Scheduled (late...
# ask-community
a
Why would a flow could be stuck in Scheduled (late run), but not running, I can see prefect agent on kubernetes is able to connect to the cloud (as per the dashboard). I don't have any other flow running. I am on free plan.
j
Hi @Amit generally flows can be “stuck” in a Scheduled state when there’s a mismatch in the labels provided to the flow’s environment and the labels provided to the agent https://docs.prefect.io/orchestration/agents/overview.html#flow-affinity-labels
What are the labels on your flow? The Kubernetes agent does not start up with any default labels so there is a good chance you need to provide them
a
There are no labels in my flow, kubernetes agent also doesn't have one.
Copy code
[2020-07-29 20:56:41,533] INFO - agent | Starting KubernetesAgent with labels []
j
Can you send a screenshot of your flow information on the UI similar to this:
a
j
Thanks! That’s interesting 🤔 because it looks like it should be getting picked up. How are you starting the kubernetes agent?
a
I have a helm chart for that. It was created from the instructions here: https://docs.prefect.io/orchestration/agents/kubernetes.html
j
Okay great, and you’re providing the agent with a RUNNER type token?
a
Yes RUNNER token, It used to work. I am facing this since today actually.
Since, I am doing a lot of testing with it, like creating and deleting flows quite often, even probably during execution, I am guessing in your system/db I have a flow running, that's why this is probably blocked?
j
Do you think you could DM me the flow run id?
a
Sure, 1 sec