Gitlab jobs will not erase

,

I am having an issue with a gitlab server running 12.x.

I am attempting to cleanup the gitlab server as I have a bunch of jobs hanging around. I am querying the jobs api to erase older jobs, and I get a 201 response code from the api indicating that the job should be erased, but the jobs remain.

http://gitlab.production.corp.com/api/v4/projects/1582/jobs/608240/erase is what I am quering according to the doc (https://docs.gitlab.com/ee/api/jobs.html)

I get a reponce back from the api, which is not an error…

So, my questions is, when I query the api, why doesn’t the job delete imediately?

  • What are you seeing, and how does it differ from what you expect to see?

So, I have a script that makes the api calls to remove the old jobs. I get a 201 responce code, but the job remains and if I run it again, the same job ID is being queued for deletion and it doesn’t delete. After about 4 hrs of sending api calls, the api stops responding to any request from the user. The user can’t broswe code from the api, I get the wheel of death when diving in to the gitlab repo code. But, I can visit the admin area, and get a list of repos on the server. After about 24 hrs, the user account recovers and is fine.

I would have expected that the api and user account to be fine and that the job would just be removed as expected.

  • Consider including screenshots, error messages, and/or other helpful visuals

  • What version are you on (Hint: /help) ? and are you using self-managed or gitlab.com?

GitLab Community Edition 12.9.3 on an on prem server

  • What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

I checked the gitlab docs for the offical api calls (https://docs.gitlab.com/ee/api/jobs.html) I also tried using the python-gitlab admon, to use the python module to remove the job rather than using the direct api metion. Not sure what else to try, without removing them manually, but the server has been running for 4 years and there 20 thousand jobs to clean up.

Thanks for taking the time to be thorough in your request, it really helps! :blush: