# What does “Downscaling app”mean？

**URL:** <https://community.fly.io/t/what-does-downscaling-app-mean/12309>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [April 18, 2023, 6:45am UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309 "2023-04-18T06:45:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![roadley](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/roadley/32/15742_2.png) [@roadley](https://community.fly.io/u/roadley)\
**Post date:** [April 18, 2023, 6:45am UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/1 "2023-04-18T06:45:14Z")

</div>

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?

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Beaux](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Beaux](https://community.fly.io/u/Beaux)\
**Post date:** [April 18, 2023, 11:41am UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/2 "2023-04-18T11:41:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pavel](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pavel](https://community.fly.io/u/pavel)\
**Post date:** [April 18, 2023, 11:49am UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/3 "2023-04-18T11:49:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Elder](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@Elder](https://community.fly.io/u/Elder)\
**Post date:** [April 18, 2023, 1:23pm UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/4 "2023-04-18T13:23:17Z")

</div>

@pavel what is considered to be inactivity?

---

<div class="post-metadata">

**Author:** ![pavel](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pavel](https://community.fly.io/u/pavel)\
**Post date:** [April 18, 2023, 3:18pm UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/5 "2023-04-18T15:18:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Elder](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@Elder](https://community.fly.io/u/Elder)\
**Post date:** [April 18, 2023, 4:33pm UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/6 "2023-04-18T16:33:38Z")

</div>

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](http://fly.io/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?

---

<div class="post-metadata">

**Author:** ![pavel](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pavel](https://community.fly.io/u/pavel)\
**Post date:** [April 19, 2023, 11:06am UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/7 "2023-04-19T11:06:26Z")

</div>

> [@Elder](#):
>
> Is this parameter described anywhere?

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.

---

<div class="post-metadata">

**Author:** ![senyo](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/senyo/32/2815_2.png) [@senyo](https://community.fly.io/u/senyo)\
**Post date:** [April 19, 2023, 12:16pm UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/8 "2023-04-19T12:16:59Z")

</div>

Just posted about this new feature which explains it in depth: [Automatically starting/stopping apps v2 instances](https://community.fly.io/t/automatically-starting-stopping-apps-v2-instances/12342)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [April 26, 2023, 12:17pm UTC](https://community.fly.io/t/what-does-downscaling-app-mean/12309/9 "2023-04-26T12:17:04Z")

</div>

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