How to solve a stuck Gitlab CI pipeline?
Asked Answered
N

5

28

We've been using Gitlab CI for some months, and in the last 1 week, we've been using the specific runner installed on a VPS. Currently, we are using "shell" as the executor.

Today our pipeline got stuck out of sudden, when we looked into the server free RAM, it's only 48MB out of 996 MB, FYI, we're using CentOS 6.

We've been struggling to get the answers, but we're stuck at the moment, and would like to know :

  • What's causing the pipeline from getting stuck?
  • is it true because of low free RAM?
  • Should we use another executor, perhaps SSH or even docker?
  • What is the best practices to deal with this kind of problem?

We would appreciate any kind of help or directions.

Newark answered 29/1, 2018 at 7:5 Comment(2)
Does the pipeline have any failed jobs or does a certain job get stuck?Unwisdom
I had this error. It might have happened to because I deployed multiple times. I'm not sure if the first pipeline was done before running a second one. I don't know how to fix it.Sihunn
D
36

In my case the pipeline was stuck because the only available runner had the option "Can run untagged jobs" set to "No" and the job was really untagged. One can fix this issue by changing the "Can run untagged jobs" option or by adding a tag to the appropriate section of the ".gitlab-ci.yml" file in the repository. In my case it was section default:tags:.

(It seems that your case is much more complicated. However I've came across this issue twice a month, and I've forgotten the decision at the second time. Thus I've came to this page which looks appropriate to save the decision. Hope the answer will help someone else.)

Dykes answered 19/11, 2018 at 16:28 Comment(0)
B
7

In my case, the pipeline was stuck because of two things:

  1. The tags specified in the .gitlab-ci.yml do not match those in the runner configuration.

  2. If you specify the simulator in the build command, ensure that you write the right version of the simulator.

Once I did these changes, everything worked well!

Good luck.

Backsaw answered 22/6, 2020 at 17:41 Comment(0)
V
1

In my case, It happened on a container that was off for a couple of days for maintenance reasons, I had to clear runner caches, and it worked!

Vivid answered 28/11, 2022 at 13:37 Comment(0)
F
0

In my case the windows gitlab-runner service was not running. Starting it solved it.

Fissiparous answered 12/12, 2022 at 8:36 Comment(0)
A
0

I had a similar issue due to the typo in tags. Tags are case sensitive.

Avatar answered 18/7 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.