gcloud 管理的虚拟机启动了太多实例
gcloud managed vm starts too many instances
完成 quickstart for Node.js,然后将应用程序部署到生产环境:
gcloud preview app deploy app.yaml --set-default
部署后,我的仪表板中有 ~12 个实例。每次部署尝试的确切数量似乎有所不同。
我把这些都杀了,删除了,再部署。又创建了 12 个。我尝试了 manual_scaling 和 automatic_scaling 都没有改善。
我的app.yaml:
# [START runtime]
runtime: nodejs
vm: true
api_version: 1
# [END runtime]
# [START resources]
resources:
cpu: .5
memory_gb: 1.3
disk_size_gb: 10
# [END resources]
# [START scaling]
manual_scaling:
instances: 1
#automatic_scaling:
# min_num_instances: 1
# max_num_instances: 1
# cool_down_period_sec: 60
# cpu_utilization:
# target_utilization: 0.5
# [END scaling]
env_variables:
NODE_ENV: 'production'
# Temporary workaround for a Cloud SDK bug.
# Ensures that node_modules directory and any .log files are not uploaded (the
# other entries are the default values for skip_files). This will skip any Unix
# hidden files (such as the .git directory)
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^(.*/)?.*/node_modules/.*$
- ^(.*/)?.*\.log$
为简洁起见,我粘贴了 output of the deploy command, version info, and other non-essentials here。
我在这里做错了什么?我需要做什么才能启动一个实例?
您的屏幕截图显示您的应用程序已部署十二个不同版本。实例名称的数字部分 yyyymmddtxxxxxx
对于同一版本将相同。
在 Developers Console 上,转到 Compute > App Engine > Versions
,然后删除您不再需要的应用程序版本。
完成 quickstart for Node.js,然后将应用程序部署到生产环境:
gcloud preview app deploy app.yaml --set-default
部署后,我的仪表板中有 ~12 个实例。每次部署尝试的确切数量似乎有所不同。
我把这些都杀了,删除了,再部署。又创建了 12 个。我尝试了 manual_scaling 和 automatic_scaling 都没有改善。
我的app.yaml:
# [START runtime]
runtime: nodejs
vm: true
api_version: 1
# [END runtime]
# [START resources]
resources:
cpu: .5
memory_gb: 1.3
disk_size_gb: 10
# [END resources]
# [START scaling]
manual_scaling:
instances: 1
#automatic_scaling:
# min_num_instances: 1
# max_num_instances: 1
# cool_down_period_sec: 60
# cpu_utilization:
# target_utilization: 0.5
# [END scaling]
env_variables:
NODE_ENV: 'production'
# Temporary workaround for a Cloud SDK bug.
# Ensures that node_modules directory and any .log files are not uploaded (the
# other entries are the default values for skip_files). This will skip any Unix
# hidden files (such as the .git directory)
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^(.*/)?.*/node_modules/.*$
- ^(.*/)?.*\.log$
为简洁起见,我粘贴了 output of the deploy command, version info, and other non-essentials here。
我在这里做错了什么?我需要做什么才能启动一个实例?
您的屏幕截图显示您的应用程序已部署十二个不同版本。实例名称的数字部分 yyyymmddtxxxxxx
对于同一版本将相同。
在 Developers Console 上,转到 Compute > App Engine > Versions
,然后删除您不再需要的应用程序版本。