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:
- Creating a new project and deploying the application there.
- Creating separate services in the existing project.
Also below is the quota usage:
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!
2
Answers
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 thezone us-central1-a
if the zone is depleted. In such cases, try creating the same resource in another zone, such asus-central1-f
.You can see more documentation.
Your latest deploy is already exceeding the default quota for your app.
My suggestion to switch from
manual_scaling
toautomatic_scaling
and change yourinstances: 1
tomin_num_instances: 1
andmax_num_instances: 5
.Your code should look like this:
You can check other service scaling settings here and working with quotas here for reference.