【发布时间】:2019-01-27 04:51:26
【问题描述】:
我有一个项目在 App Engine 上运行,使用 PHP,它是 not autoscaling
我的app.yaml 文件:
runtime: php
api_version: '1.0'
env: flexible
threadsafe: true
env_variables:
APP_KEY: 'base64:*****'
APP_LOG: errorlog
CACHE_DRIVER: database
DB_DATABASE: animes
DB_HOST: localhost
DB_PASSWORD: ******
DB_SOCKET: '/cloudsql/*******'
DB_USERNAME: root
SESSION_DRIVER: database
STORAGE_DIR: /tmp
automatic_scaling:
min_num_instances: 2
max_num_instances: 20
cpu_utilization:
target_utilization: 0.5
我是否需要通过延迟或请求计数进行自动缩放?有可能吗?
我尝试在我的 app.yaml 中设置 max_pending_latency 和 min_pending_latency,但是出现了这个错误:
automatic_scaling:
max_pending_latency: 30ms
min_pending_latency: 15ms
min_num_instances: 1
max_num_instances: 20
cool_down_period_sec: 120
cpu_utilization:
target_utilization: 0.5
gcloud app deploy 返回
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: VM-based automatic scaling should NOT
have the following parameter(s): [min_pending_latency, max_pending_latency]
- '@type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: 'VM-based automatic scaling should NOT have the following parameter(s):
[min_pending_latency, max_pending_latency]'
field: version.automatic_scaling
【问题讨论】:
-
如果你指的是these values,你不能在Flexible中使用
min_pending_latency。在灵活中,您只能根据 CPU 使用情况进行扩展(自动扩展),正如您在 another question you have 中所解释的那样,或者使用手动扩展。 -
如果它可以帮助您解决问题或理解您的问题,请记得点赞和/或接受答案。这是为了帮助将来看到此问题的 Stackoverflow 用户。
-
抱歉,这是我第一次看到“Google App Engine 的可能副本不自动缩放 php”
-
"如果您指的是这些值,则不能在灵活中使用 min_pending_latency。在灵活中,您只能根据 CPU 使用情况进行缩放(自动缩放),正如您所拥有的,正如它所解释的那样在您遇到的另一个问题中,或使用手动缩放。”。我需要更改我的 app.yaml,我该怎么做?
标签: php google-app-engine request autoscaling latency