After a hefting bill from leaving my project turn on for 7 days in GCloud i decided to look for an explanation. I found that app.yaml wasnt configure so that it uses the basic minimum spec. So i found this
app.yaml
runtime: aspnetcore
env: flex
automatic_scaling:
min_num_instances: 0
max_num_instances: 1
cool_down_period_sec: 180
cpu_utilization:
target_utilization: 0.6
target_concurrent_requests: 100
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
I tried this version from Pricing of Google App Engine Flexible env, a $500 lesson but i manage to get it to work on the first try but after following deployment i kept getting the same error above.
The version that work the first time round
runtime: aspnetcore
env: flex
instance_class: F1
automatic_scaling:
max_instances: 1
min_instances: 0
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
CodePudding user response:
This configuration seems to work in the end and i found out that i cannot set min_num_instances
to 0
runtime: aspnetcore
env: flex
instance_class: F1
automatic_scaling:
min_num_instances: 1
max_num_instances: 1
cool_down_period_sec: 180
cpu_utilization:
target_utilization: 0.6
target_concurrent_requests: 100
inbound_services:
- warmup
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
CodePudding user response:
The issue is due to the min_num_instances
, since in Flex environment there can't be zero instances, as mentioned in the documentation:
The standard environment can scale from zero instances up to thousands very quickly. In contrast, the flexible environment must have at least one instance running for each active version
Changing the value of the parameter to greater than zero should help to fix the error