I have been unable to deploy a new Ruby service in my project for quite a while now. Everytime I try, I get this error:
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The following quotas were exceeded: CPUS (quota: 0, used: 0 + needed: 1).
I have looked into the AppEngine Quotas page in the Console, but I cannot see any quotas that are reaching the limit. Here is a screenshot as proof:

AppEngine quotas do not show any CPUS quota. I could only find a similar quota in the general Quotas page, but still everything appears within the limit:

I have noticed that this fails even with the basic Ruby quickstart setup, this is the app.yaml used in the deployments:
runtime: ruby
env: flex
service: test
entrypoint: bundle exec ruby app.rb
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
I appreciate any assistance with this, because I am honestly lost.
EDIT:
One of my colleagues suggested we tried deploying a GCE instance in the same region as the Appengine service (asia-south1), and we got the same error:
Quota 'CPUS' exceeded. Limit: 0.0 in region asia-south1.
Shouldn't this be a bug of the quotas page then? Why can I see that this region has quota available if, in reality, it doesn't?
As per this GCP official docs some new accounts and projects have global CPUs (All regions) quota that quota that applies to all regions and is measured as a sum of all your vCPUs in all regions.
For example, if you have 48 vCPUs remaining in a single region such as us-central1 but only 32 vCPUs remaining for the CPUs (All Regions) quota, you can launch only 32 vCPUs in the us-central1 region, even though there is remaining quota in the region.
You can get the quota for all regions from the quota page using the following Quota metric.
compute.googleapis.com/cpus_all_regionsCPUS-ALL-REGIONS-per-projectThough, I can see that you are using only 1 CPU at us-cetral1-a and I hope you have required limit at All Regions. If you see that ALL Regions Quota limit is 0 then you need to increase the Quota using QIR. Please note that A support representative from the Compute Engine team will respond to your request within 24 to 48 hours.
If this is not a issue I suggest you to open a support case with GCP support team to investigate further.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With