8

I got an error when command "gcloud preview app deploy app.yaml --promote" :

ERROR: (gcloud.preview.app.deploy) Error Response: [13] CPU Quota Exceeded: in use: 7, requested: 2, limit: 8 Version: 20151201t142343.388948918338383472

Is there anything to solve this situation?

LKM
  • 2,410
  • 9
  • 28
  • 53
  • Are you still on Free Trial? Because if you are not, you just need to request for more quota. Just go in your Google Compute Engine quota page, there should be a button "Request additional quota" which will take you to a form :). Cheers! – Patrice Dec 07 '15 at 15:29

2 Answers2

8

Since I just ran into this too, and was a bit boggled:

it seems like every deploy you do for e.g. a node.js project creates a new compute engine CPU. If you go into your project's gcloud dashboard, you can see the number of compute engine instances - remove old ones, and you can deploy again.

Groxx
  • 2,489
  • 1
  • 25
  • 32
  • 1
    So the question becomes, why doesn't Google automatically delete the old instances whenever you do a new deploy? – Adam Reis Jun 02 '16 at 22:59
  • Is there a way for the applications to reuse the compute engine? It's annoying that part of the deploy process means going to the dashboard to spin down the instances they create after each deploy. Any examples of having this done in a deploy hook? – Myk Klemme Oct 14 '16 at 21:58
  • 5
    @Groxx it says that I have 8 instances but when I click on compute engine instances, I do not see a list. I see a popup that says "create instance" – Neha Sohail Dec 01 '16 at 21:13
1

just went through an unexpected downtime with this.. running appengine flex environment with a meteor app with minimal resource usage (bandwidth, disk, memory, qps)..

i guess i have to navigate to a quotas section located at https://console.cloud.google.com/iam-admin/quotas?project=your-project-id

here's what my "request" looks like when submitted as example: google cloud console quota increase request

and submit a request for resources that have been auto set to null values.. thanks for the heads up google. i trust the SLA to leave me at the mercy of their whims..

but for others, hopefully this gives a better indication of what to do when encountering:

DEBUG: HttpError accessing <https://appengine.googleapis.com/v1/apps/<project-id>/services/default/versions?alt=json>: response: <{'status': '400', 'content-length': '217', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Wed, 25 Oct 2017 04:42:45 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="39,38,37,35"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
  "error": {
    "code": 400,
    "message": "The following quotas were exceeded: DISKS_TOTAL_GB (quota: 0, used: 10 + needed: 0), INSTANCES (quota: 0, used: 1 + needed: 0).",
    "status": "INVALID_ARGUMENT"
  }
}
>
DEBUG: (gcloud.app.deploy) Error Response: [400] The following quotas were exceeded: DISKS_TOTAL_GB (quota: 0, used: 10 + needed: 0), INSTANCES (quota: 0, used: 1 + needed: 0).
https://appengine.googleapis.com/v1/apps/<project-id>/services/default/versions?alt=json
Traceback (most recent call last):
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 789, in Execute
    resources = args.calliope_command.Run(cli=self, args=args)
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 754, in Run
    resources = command_instance.Run(args)
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/surface/app/deploy.py", line 62, in Run
    use_service_management=use_service_management)
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 624, in RunDeploy
    flex_image_build_option=flex_image_build_option)
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 418, in Deploy
    endpoints_info)
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 162, in DeployService
    self.client.apps_services_versions.Create, create_request)
  File "~/.pyenv/versions/2.7.11/envs/env-2.7.11/lib/python2.7/site-packages/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/api/requests.py", line 71, in MakeRequest
    raise exc
HttpException: Error Response: [400] The following quotas were exceeded: DISKS_TOTAL_GB (quota: 0, used: 10 + needed: 0), INSTANCES (quota: 0, used: 1 + needed: 0).
https://appengine.googleapis.com/v1/apps/<project-id>/services/default/versions?alt=json
ERROR: (gcloud.app.deploy) Error Response: [400] The following quotas were exceeded: DISKS_TOTAL_GB (quota: 0, used: 10 + needed: 0), INSTANCES (quota: 0, used: 1 + needed: 0).
https://appengine.googleapis.com/v1/apps/<project-id>/services/default/versions?alt=json

and an amazingly friendly error message when visiting the site via http:

Error: Server Error

The server encountered a temporary error and could not complete your 
request.
Please try again in 30 seconds.
grgry
  • 173
  • 8