6

I'm using Google Cloud Build along with kaniko cache for speedup. Until recently if worked perfectly, but now it's failing with

ERROR: build step 2 "gcr.io/kaniko-project/executor:latest" failed: step exited with non-zero status: 137

I assume, it's because builder is running out of memory

Is there a way to select higher level VM for this or increase memory?

I'm using the same standard configuration that is described here.

Thanks in advance

P.s. Regular builds with gcr.io/cloud-builders/docker are going through

Wytrzymały Wiktor
  • 11,492
  • 5
  • 29
  • 37
Sokolowadim
  • 63
  • 1
  • 4
  • 1
    With this `Is there a way to select higher level VM for this or increase memory` you mean the VM that is building your app, not the actual instance where it will be hosted, right? – Ralemos Mar 03 '21 at 13:16
  • 1
    Right, because actual instances are performing well. The problem is during build process itself – Sokolowadim Mar 03 '21 at 13:34

2 Answers2

4

Yes, this is possible, all you have to do is specify what machine type you want to use during your build at the build command, as you can see in this documentation where there are also examples with how to start builds with this special machines is gcloud, Yaml and JSON .

Currently the machine types available for this are

UNSPECIFIED     Standard machine type.
N1_HIGHCPU_8    Highcpu machine with 8 CPUs.
N1_HIGHCPU_32   Highcpu machine with 32 CPUs.
E2_HIGHCPU_8    Highcpu e2 machine with 8 CPUs.
E2_HIGHCPU_32   Highcpu e2 machine with 32 CPUs.

And you can find more information on those specific types of machines in here.

Ralemos
  • 5,571
  • 2
  • 9
  • 18
-1

I had same issue. I forgot to run this command to activate kaniko cache.

gcloud config set builds/use_kaniko True

After that, the error disappeared.

Nori
  • 2,340
  • 1
  • 18
  • 41