3

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:

screenshot

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:

screenshot

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?

  • Can you show the version history of this App Engine service? Do you have other flex App Engine service? – guillaume blaquiere Jan 15 '21 at 12:19
  • Hi @guillaumeblaquiere thanks for your comment. We never had an App Engine Flex service with this project, only Standard, so this would be the first, if it worked. The quota consumption in the screenshot is most likely from a GCE instance we use. – Carla Harris Jan 15 '21 at 13:43
  • Is it possible to change the region for the deployment? May be you are experiencing some resource outage for the zone but I'm not sure though. Please share us the deployment logs to investigate further. – Mahboob Jan 15 '21 at 15:29
  • Thanks for the suggestion @Mahboob. I'm afraid I'm too new to Appengine Flex, so I don't know how to change the region of the deployment. Also, about the deployment logs, where would I find them? I know deployments trigger a new build, but these seem to be fine as well. [Example](https://i.stack.imgur.com/MxtY5.png). I even tried again just now to make sure I was looking at the correct build. – Carla Harris Jan 15 '21 at 16:55
  • Using this [doc](https://cloud.google.com/appengine/docs/standard/nodejs/building-app/viewing-service-logs#using-logs-viewer) you can grab the logs, please select severity>=WARNING – Mahboob Jan 15 '21 at 17:02
  • Checking my last test, the only log available gives the same message as the gcloud command: [screenshot](https://i.stack.imgur.com/DAjSy.png) – Carla Harris Jan 15 '21 at 17:39
  • It is not possible to change a region for an App Engine application (it doesn't matter if it's App Engine Standard or Flexible). App Engine Flexible relies in Compute Engine instances to run your application and therefore Compute Engine Quotas are important for a successful deployment. It could be a transitive issue due to a stock-out on the specific region where your app is hosted, but If you have a support plan I'd strongly advise to [create a support case](https://cloud.google.com/support/docs/manage-cases#creating_cases) for them to provide you further guidance. – Daniel Ocando Jan 15 '21 at 22:13
  • Thanks for weighting in @DanielOcando , I have been experiencing this issue for several days now, and it is really important that we are able to deploy a new Appengine service with this project. I don't have the paid service to open the support request. – Carla Harris Jan 18 '21 at 11:52
  • It'd be very hard to clearly understand what's going on without further inputs from the support team and check if it's a project specific issue related to quotas (I was able to deploy the quickstart for GAE flex ruby runtime). If you don't plan to purchase a support plan you could report the issue [here](https://cloud.google.com/support/docs/issue-trackers) with the hope of getting the correct assistance. Make sure that you provide a minimum, reproducible example of your ruby application without sharing any sensitive information as well as the exact steps followed to deploy the app. – Daniel Ocando Jan 18 '21 at 13:00
  • Hi @CarlaHarris were you able to resolve this? – absk Jan 25 '21 at 12:01
  • 2
    Hi @absk , no, I am still not able to deploy Appengine Flex to asia-south1, neither I can create a GCE instance there. I'm pretty sure this is a bug with the Cloud Console for showing that I have quota available for that region, when the reality is that I do not. – Carla Harris Jan 26 '21 at 09:45

1 Answers1

0

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.

  • Quota Metric: compute.googleapis.com/cpus_all_regions
  • Limit Name: CPUS-ALL-REGIONS-per-project

Though, 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.

Andrew
  • 795
  • 4
  • 18
Mahboob
  • 1,877
  • 5
  • 19
  • Thanks for your answer @Mahboob, I can see that the CPUS (All Regions) quota is very much below the limit, I'm not sure why it should an issue in this case as the limit is 360 for this project. I do not have a paid plan to open the support case, is there any other way for me to fix this issue? – Carla Harris Jan 18 '21 at 11:48
  • Another option you can contact GCP sales rep https://cloud.google.com/contact, they might help you to investigate further, they are open to take call from Monday to Friday 8am - 8pm est – Mahboob Jan 18 '21 at 12:45
  • 2
    Hi @Mahboob, thanks for all your help. I have updated my question. In the end, I think the region doesn't have the resources, like you said. I just don't know why this is not shown in the quotas page. – Carla Harris Jan 19 '21 at 08:29