我有一个使用PHP在App Engine上运行的项目,它是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应用部署
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