Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

"Invalid value specified for cpu. For the specified value, maxScale may not exceed 10"

Hi community - I'm getting a new error , which is very strange; see below. On VSC/GoogleCloudRun , how/why/where do I need to set maxScale..?  I notice, now that I do not even have a package.json file (which i see other people sometimes referring to). Everything has been fine for some time.. and now this. Hmm.

-----

 

Build [gcr.io/mosf-project/mosfinfo] succeeded
Executing Gcloud Run Deploy
Running gcloud command: run deploy mosfinfo --project mosf-project --image gcr.io/mosf-project/mosfinfo --client-name Cloud Code for VS Code --client-version 1.21.5 --platform managed --region us-east4 --port 8080 --cpu 1 --memory 512Mi --concurrency 80 --timeout 300 --service-account 746222545086-compute@developer.gserviceaccount.com --clear-env-vars
Deploying container to Cloud Run service [mosfinfo] in project [mosf-project] region [us-east4]
Deploying...
failed
 
Deployment failed
ERROR: (gcloud.run.deploy) spec.template.spec.containers.resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 10.
Consider running your workload in a region with greater capacity, decreasing your requested cpu-per-instance, or requesting an increase in quota for this region if you are seeing sustained usage near this limit, see https://cloud.google.com/run/quotas. Your project may gain access to further scaling by adding billing information to your account.
 
Solved Solved
0 3 4,502
1 ACCEPTED SOLUTION

is there some setting there that affects the max instances?

Unfortunately, I don't know. 

> The docs say that 100 is the default for maxScale

It's possible that 100 is the max (all things being equal) but that the value is dependent on the value of the CPU (i.e. only certain combinations are allowed). That seems to be the thrust of the error message. It's also possible that wasn't the case previously but that the change is a recent one. Google typically document these changes in the release notes but I don't think it's common for folks to automatically read a release note - people typically only go to it when they hit a snag 🙂

View solution in original post

3 REPLIES 3

Don't know how to do this from commandline or console but see if you can do it from the UI. 

  1. Go to https://console.cloud.google.com/run
  2. Select your project
  3. Click on your Cloud Run name
  4. Click on Edit and Deploy New Revision
  5. My understanding of the error is that for the value you have for number of CPUs (see image 1 below), your scaling value (see image 2 below) can't be more than 10 so adjust the following settings the way you want
  6. The error also seems to imply that adding billing information might resolve your issue

Image 1 - Number of CPUSImage 1 - Number of CPUS

 

Image 2 - Cloud Run ScaleImage 2 - Cloud Run Scale

 

..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine

Thank you. Creating a new revision on the Console allowed me access to the maxScale field which I set down to 10, a subsequent Deploy_to_cloud (from Visual Studio Code) worked and pushed my revisions to the endpoint. Thank you. 👍  The docs say that 100 is the default for maxScale, though, and I'm confused as to why I was 'suddenly' forced to crank it back to 10. Of note - I recently changed the Billing account on this cloud project to use a co-owner's Billing Account, and as far as we can tell that billing account is in good standing and ready to go (is there some setting there that affects the maxinstances?)

is there some setting there that affects the max instances?

Unfortunately, I don't know. 

> The docs say that 100 is the default for maxScale

It's possible that 100 is the max (all things being equal) but that the value is dependent on the value of the CPU (i.e. only certain combinations are allowed). That seems to be the thrust of the error message. It's also possible that wasn't the case previously but that the change is a recent one. Google typically document these changes in the release notes but I don't think it's common for folks to automatically read a release note - people typically only go to it when they hit a snag 🙂