What does “Downscaling app”mean?

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
1 Like

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.

1 Like

@pavel what is considered to be inactivity?

In this particular case, since there is only one machine for the app - fly-proxy will consider downscaling if there are no requests to the app.

Is this parameter described anywhere? I haven’t found any mention of auto_stop_machines in the Fly.io: A New Public Cloud · Fly Docs

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?

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.

1 Like

Just posted about this new feature which explains it in depth: Automatically starting/stopping apps v2 instances

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.