very minor request, could someone help me delete a...
# ask-community
b
very minor request, could someone help me delete an old agent in the UI that refuses to die (Remove and Clean Up both just spin for a while and then nothing happens)? ID is
d6962d8d-f4b0-4e04-8217-82d41400a043
a
@Brett Naul if removing the agent via UI doesn’t work, you could try to do it via API. First list agents to get the ID of the agent in question:
Copy code
query{
   agents {
    name
    type
    id
  }
}
Then, use delete_agent mutation:
Copy code
mutation DeleteAgent {
  delete_agent(input: {agent_id: "your_agent_id"}) {
    success
  }
}
if this doesn’t work too, you may be affected by this rare issue.
b
I think it's failing in the same way
Copy code
{
  "errors": [
    {
      "path": [
        "delete_agent"
      ],
      "message": "Operation timed out",
      "extensions": {
        "code": "API_ERROR"
      }
    }
  ],
  "data": {
    "delete_agent": null
  }
}
a
yup, looks like the same issue as here
b
ah, ok...well at least I'm not alone 🙂
z
I’ll see if we can do something from the backend here. I’m guessing there’s a timeout as it tries to update all the associated flow runs.
c
Hey @Brett Naul -- sorry for the delay, this has been done now; may take a minute to flush from caches
b
sweet, thanks!
not sure if it's related but I've been seeing this message a lot lately, restarting the (k8s) agent didn't help. pod seems totally normal and healthy. any ideas on how to debug? eventually the jobs do get picked up after anywhere from 3-10 minutes nevermind this was something else
Copy code
[2021-12-17 20:19:43-0500] WARNING - prefect | Flow 'brett-travel_activities/configs/mini_nor_cal.yaml': It has been 110 seconds and your flow run has not been submitted by an agent. Agent b809097f-2328-4634-9b87-cccc94c70453 (agent) has matching labels and last queried 3 minutes ago. Since it hasn't queried recently, it looks unhealthy. Restart it or start a new agent with labels {'data-usa'} to deploy your flow run.