Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No apparent way of stopping queued jobs which are blocking new jobs from running

  • Admin for organization
  • Private project
  • Microsoft-hosted Agent
  • Azure Pipelines Agent Pool
  • "Currently running 0/1 jobs"
  • Nothing actively running in any of the pipelines
  • Go to run one of the pipelines and it says: The agent request is not running because all potential agents are running other requests. Current position in queue: 6
  • Check Azure Pipeline Agent Pool and there are "6 current jobs"
  • One is the one I just triggered and five have been running 4.5 hours
  • I can "Cancel" the one I just triggered
  • The other five that have been running for 4.5 hours, there is no apparent way to end them... no "Cancel", "Delete", etc... nothing anywhere

Tried deleting the Agent Pool from the project, but like it says when you go to do that, doesn't do anything about the Organization Agent Pool so they still remain.

Any suggestions for how stop these five jobs that are blocking anything else from running?

EDIT:

Did make some progress by going through this answer and can at least interact with the REST API:

Azure DevOps pipelines: Cancel multiple pending jobs in queue

Still not helpful though.

The ones in red are the Jobs that are still running. They are basically duplicates of the ones below that were canceled. They have the same buildIds and buildNumber so when you look them up in the REST API, they say they are "status": "completed" but they clearly are not.

The ones that are still running that have the same buildIds and buildNumber as the "canceled" ones below, but they do have unique jobId... which isn't an accepted URI parameter.

enter image description here

Also, tried to DELETE the build... nothing either. Just returns 204 No Content... still running.

like image 959
cjones Avatar asked Dec 06 '25 18:12

cjones


1 Answers

I hope someone comes along with a real answer to this because what ended up fixing the issue for me is complete BS. I'm giving Microsoft the benefit of the doubt that there is an actual solution to this and I just wasn't able to find it.

What I ended up having to do was:

  • Disabling the Hosed Agent
  • Waiting until the "Last Run" said an actual time instead of "Now" (takes ~45 minutes)
  • Turn it back on
  • This would cause the erroneous job that was running to disappear
  • Then the next erroneous job would start running
  • Rinse and repeat until they are all gone

enter image description here

So what seems like it should have a pretty straight forward fix / feature in the UI, or the API, ended up taking 10 hours to figure out.

I could never find anything in REST API documentation where I could enter this unique jobId to send CRUD operations related to it.

like image 104
cjones Avatar answered Dec 08 '25 08:12

cjones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!