gcloud管理的虚拟机启动了太多的实例 [英] gcloud managed vm starts too many instances

查看:119
本文介绍了gcloud管理的虚拟机启动了太多的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过



我杀了所有这些,删除它们,然后再次部署。 〜多创建12个。

我的app.yaml:

 #[START运行时] 
运行时:nodejs
vm:true
api_version:1
#[END运行时]
$ b $ [START资源]
资源:
cpu:.5
memory_gb:1.3
disk_size_gb:10
#[END资源]

#[START缩放]
manual_scaling:
实例: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'

#临时解决方法对于云SDK错误。
#确保node_modules目录和任何.log文件不被上传(
#其他条目是skip_files的默认值)。这将跳过任何Unix
#隐藏文件(例如.git目录)
skip_files:
- ^(。* /)?#。*#$
- ^( (*。)*。*。*。*。*。*。*。*。*。*。*。*。*。*。*。*。*。*。 $
- ^(。* /)?\ .. * $
- ^(。* /)?。* / node_modules /.*$
- ^(。* /) ?。* \.log $

为简洁起见,我粘贴了在这里输出部署命令,版本信息和其他非基本要素



我在这里做错了什么?我需要做什么来启动一个实例?

解决方案

您的屏幕截图显示了您的应用程序的十二个不同版本已部署。实例名称 yyyymmddtxxxxxx 的数字部分对于相同版本将保持不变。



在Developers Console上,到计算> App Engine>版本,并删除您不再需要的应用程序版本。

Worked through the quickstart for Node.js, then deployed the app to production:

gcloud preview app deploy app.yaml --set-default

After deploying, there are ~12 instances in my dashboard. The exact number seems to vary for each deploy attempt.

I killed all of these, deleted them, and deployed again. ~12 more are created. I tried both manual_scaling and automatic_scaling with no improvement.

My 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$

For brevity, I pasted the output of the deploy command, version info, and other non-essentials here.

What am I doing wrong here? What do I need to do to start exactly one instance?

解决方案

Your screenshot shows twelve different versions of your application has been deployed. The numerical part of the instances names yyyymmddtxxxxxx will be same for the same version.

On the Developers Console, go to Compute > App Engine > Versions , and delete those versions of the application that you don't need anymore.

这篇关于gcloud管理的虚拟机启动了太多的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆