Home > Back-end >  ERROR: Response[8] The requested amount of instances has exceeded GCE's default quota. GCP
ERROR: Response[8] The requested amount of instances has exceeded GCE's default quota. GCP

Time:09-22

I know there are similar questions available but I have checked them all and after that, I am asking this question.

So while deploying a .Net application to GCP app engine I am getting following error:

An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2021-09-21T04:26:19.798Z105556.in.0: The requested amount of instances has exceeded GCE's default quota.

I am using .Net 3.1 and App engine Flexible environment. Below are options I already tried:

  1. Creating a new project and deploying the application there.
  2. Creating separate services in the existing project.

Also below is the quota usage: enter image description here

As you can see I am not over utilizing my quota limit and here is my App.yaml file:

runtime: aspnetcore
env: flex
manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

Error when I deploy from Google cloud SDK shell:

Step #0: No .deps.json file found for the app
Finished Step #0
ERROR
ERROR: build step 0 "gcr.io/gcp-runtimes/aspnetcorebuild@sha256:f5552a5efdaf278a3124ea10fd1c9636b09fc9f98f9e 620cbd71279797576b3f" failed: step exited with non-zero status: 1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at 
https://console.cloud.google.com/cloud-build/builds/20606673-dc57-48b4-bd4d-a52206623dd3?project=383088687946 Failure status: UNKNOWN: Error 
Response: [2] Build failed; check build logs for details

Thanks a lot in advance!

CodePudding user response:

If you have a regional quota, a resource might not be available in a specific zone. For example, you might have quota to create VM instances in region us-central1, but you might not be able to create VM instances in the zone us-central1-a if the zone is depleted. In such cases, try creating the same resource in another zone, such as us-central1-f. To learn more about your options if zonal resources are depleted, see General troubleshooting.

here is the link:

https://cloud.google.com/compute/quotas

CodePudding user response:

Your latest deploy is already exceeding the default quota for your app.

My suggestion to switch from manual_scaling to automatic_scaling and change your instances: 1 to min_num_instances: 1 and max_num_instances: 5.

Your code should look like this:

automatic_scaling:
  min_num_instances: 1
  max_num_instances: 5

You can check other service scaling settings here and working with quotas here for reference.

  • Related