<@ULVA73B9P> What can I do if my kubernetes work q...
# ask-marvin
s
@Marvin What can I do if my kubernetes work queue goes unhealthy?
m
It appears that a Kubernetes work queue can be considered unhealthy if it hasn't been polled in over 60 seconds or if it has one or more late runs [^1^]. To address this issue, you can try the following steps: 1. Verify that your execution layer has enough permissions to spin up the required resources, such as IAM roles and a valid Prefect API key [^2^]. 2. Ensure that your execution layer has enough capacity on the cluster to deploy your flow run. Allocate more CPU and memory to the agent process if necessary [^2^]. 3. If the agent is polling too frequently and consuming lots of resources, try decreasing the poll frequency to, for example, 30 seconds:
prefect config set PREFECT_AGENT_QUERY_INTERVAL='30.0'
[^2^]. 4. Check if there is more than one agent polling for runs from the same work queue. Multiple agents polling from the same work queue can lead to some pending runs that can't get deployed efficiently [^2^]. I hope this helps you get your work queue back on track. Remember, a healthy work queue is a happy work queue... or something like that. [^1^]: Prefect Automations [^2^]: My flow run in Prefect 2 is stuck in a pending state what can I do