Has gcloud run changed minimum memory limits?

Viewed 688

A recent cloud run project previously deployed fine with memory limit of 128MB (--memory 128M) but this failed today with the error:

ERROR: (gcloud.run.deploy) Invalid value specified for memory. For 1.0 CPU, memory must be between 128Mi and 4Gi inclusive.

Changing the config to --memory 128Mi resolved the issue but since a mebibyte is larger than a megabyte this looks like a change to me though there's not much indication of minimum limits on the docs or quota pages. Anyway, for info and in case anyone else can confirm...

2 Answers

After the Documentation Updated for Minimum memory configuration in August 2022, you can see the changes as mentioned in the Documentation :

The minimum memory setting varies depending on whether you use first generation or second generation execution environment:

  • 128 MiB for first generation
  • 512 MiB for second generation

You can also refer to the Answer states as:

The format for size is a fixed or floating point number followed by a unit: G, M, or K corresponding to gigabyte, megabyte, or kilobyte, respectively, or use the power-of-two equivalents: Gi, Mi, Ki corresponding to gibibyte, mebibyte or kibibyte respectively.

Might have been an update to Kubernetes... I use to be able to use gcloud run deploy without specifying cpu, memory, etc.

Now if I don't specify these settings I get:

ERROR: (gcloud.run.deploy) spec.template.spec.containers[0].resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 30.

Had to set --max-instances=30 for it to work.

Related