I’m testing out Automatically stop and start Machines · Fly Docs but it doesn’t seem to be working.
According to the docs
If
auto_stop_machines = true
,min_machines_running = 0
, and there’s no traffic to your app, eventually all of your app’s Machines could be stopped.
I was expecting the state of my VM to be “paused” after some number of idles minutes. But it’s remained at “started” even though it hasn’t received traffic. I don’t see anything in the logs either to indicate that it ever scaled down to 0.
-
Is this just a timing issue – it needs to be idle for X duration? I waited for it to be idle for up to 30 minutes but it hasn’t stopped yet.
-
Could anything be wrong with my configuration? I am hitting the api.machines.dev directly with the following JSON (not using flyctl). I am acting as a SaaS so I’m managing my customer’s fleet on top of fly.io.
{
"config": {
"init": {},
"services": [
{
"protocol": "tcp",
"internal_port": 5000,
"ports": [
{
"port": 443,
"handlers": [
"tls",
"http"
]
},
{
"port": 80,
"handlers": [
"http"
]
}
],
"auto_stop_machines": true,
"auto_start_machines": true,
"min_machines_running": 0
}
],
"checks": {
"httpget": {
"type": "http",
"port": 5000,
"method": "GET",
"path": "/__/zuplo/knative-ready",
"interval": "15s",
"timeout": "10s"
}
},
"image": "registry.fly.io/zuplo-deno-staging:1.20.0",
"restart": {
"policy": "no"
},
"guest": {
"cpu_kind": "shared",
"cpus": 1,
"memory_mb": 256
}
}
}
The app is nick-testing
under `zuplo-customers-staging’.
I have tried looking at other posts
- min_machines_running=0 not working for simple test application - #4 by jmsfbs I do have services expose and this application can be ping’ed since I allocated a IPV4 for it.
- Autoscaling auto_stop_machines not working - #4 by andie nothing that I can try here.
Thanks!