英文:
Error while trying to deploy to Google App Engine: max instances limit
问题
I am trying to deploy a new version of my app on Google App Engine, but it fails with this error:
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: You may not have more than 32 total max instances in your project.
I am surprised because the configuration file mentions 1 for max instances:
runtime: nodejs18
service: staging
instance_class: B1
basic_scaling:
max_instances: 1
idle_timeout: 5m
The full trace:
gcloud app deploy --project=abc123 app.staging.yaml
Services to deploy:
descriptor: [<redacted>/gae-payload/app.staging.yaml]
source: [<redacted>/gae-payload]
target project: [spfblogcollection]
target service: [staging]
target version: [20230517t155800]
target url: [https://staging-dot-<redacted>.ey.r.appspot.com]
target service account: [<redacted>@appspot.gserviceaccount.com]
Do you want to continue (Y/n)? Y
Beginning deployment of service [staging]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: You may not have more than 32 total max instances in your project.
gcloud version:
Google Cloud SDK 431.0.0
alpha 2023.05.12
beta 2023.05.12
bq 2.0.92
bundled-python3-unix 3.9.16
cloud-datastore-emulator 2.3.0
core 2023.05.12
gcloud-crc32c 1.0.0
gsutil 5.23
英文:
I am trying to deploy a new version of my app on Google App Engine, but it fails with this error:
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: You may not have more than 32 total max instances in your project.
I am surprised because the configuration file mentions 1 for max instances:
runtime: nodejs18
service: staging
instance_class: B1
basic_scaling:
max_instances: 1
idle_timeout: 5m
The full trace:
gcloud app deploy --project=abc123 app.staging.yaml
Services to deploy:
descriptor: [<redacted>/gae-payload/app.staging.yaml]
source: [<redacted>/gae-payload]
target project: [spfblogcollection]
target service: [staging]
target version: [20230517t155800]
target url: [https://staging-dot-<redacted>.ey.r.appspot.com]
target service account: [<redacted>@appspot.gserviceaccount.com]
Do you want to continue (Y/n)? Y
Beginning deployment of service [staging]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: You may not have more than 32 total max instances in your project.
gcloud version:
Google Cloud SDK 431.0.0
alpha 2023.05.12
beta 2023.05.12
bq 2.0.92
bundled-python3-unix 3.9.16
cloud-datastore-emulator 2.3.0
core 2023.05.12
gcloud-crc32c 1.0.0
gsutil 5.23
答案1
得分: 3
解决方法是通过控制台从App Engine中删除旧的未使用版本,因为这些版本似乎会计入项目级的最大实例数,即使不再使用。这是有道理的,但我感到惊讶。
否则,如果对某人有帮助的话,似乎使用自动扩展部署是有效的:
runtime: nodejs18
service: staging
instance_class: F1
automatic_scaling:
max_instances: 1
英文:
The solution is to delete old unused version from App Engine through the console, because these versions seem to count toward the project-level max instances even if not used anymore. It makes sense but I was surprised.
Otherwise, in case that may help someone, it seems that deploying with automatic scaling works:
runtime: nodejs18
service: staging
instance_class: F1
automatic_scaling:
max_instances: 1
答案2
得分: 0
去Google Cloud控制台,然后选择App Engine。在左侧菜单中选择版本,然后删除旧的未使用版本。
英文:
Go to Google Cloud Dashboard, then choose App Engine. On the left menu choose Versions and delete the old unused versions.
答案3
得分: 0
"automatic_scaling"或"basic_scaling"部分在"app.yaml"中并没有解决我的问题。我提供了使其工作的配置。
manual_scaling:
instances: 1
英文:
Actually, neither the automatic_scaling
or basic_scalling
section properties in the app.yaml
did solve my problem. I provide the configuration that makes it work.
manual_scaling:
instances: 1
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论