Today I deploy my app many times, deployment succeed, but after few minutes, monitor print the following information. I try to change region, but dosen’t work, What should I do?
2023-04-18T06:36:17.032 app[6e82e25c206987] waw [info] Sending signal SIGINT to main child process w/ PID 513
2023-04-18T06:36:17.040 proxy [6e82e25c206987] waw [info] Downscaling app aabb123 in region waw. Automatically stopping machine 6e82e25c206987. 1 instance is running but has no load
2023-04-18T06:36:22.097 app[6e82e25c206987] waw [info] Sending signal SIGTERM to main child process w/ PID 513
2023-04-18T06:36:23.005 app[6e82e25c206987] waw [info] Starting clean up.
2023-04-18T06:36:24.005 app[6e82e25c206987] waw [info] [ 50.188612] reboot: Restarting system
Same issue here. It seems apps are scaling to zero, which means they stop if they don’t receive traffic for a few minutes. I don’t want this, is there any way to disable it?
I’ve already tried fly scale count 1 but it seems to have no effect.
You can set auto_stop_machines = false under the [http_service] section of fly.toml to prevent fly-proxy from stopping the machines in case of inactivity.
Not yet. This is a new feature for machines and the docs are lagging a bit behind.
What is the lag between last request and shutdown?
How will it behave if there is more than one machine for the app? In more than one region?
The algorithm is not set in stone and might change in the future, but for now it evaluates app’s load every three minutes. If you have more than one app instance in a region the downscaler checks app’s load against configured soft_limit and considers downscaling the app only if you have two or more app instances with load below soft_limit in this region. This happens independently in each region.