# flyctl scale count n gives an error for some values of n

**URL:** <https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278>\
**Category:** General\
**Created:** [April 26, 2021, 7:28am UTC](https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278 "2021-04-26T07:28:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewrobertbell](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/matthewrobertbell/32/574_2.png) [@matthewrobertbell](https://community.fly.io/u/matthewrobertbell)\
**Post date:** [April 26, 2021, 7:28am UTC](https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278/1 "2021-04-26T07:28:48Z")

</div>

My app which was migrated to “new autoscaling” seems to have errors with autoscaling disabled.

When I run flyctl scale count n, it works when n is 1, 5, 10 but shows “an unknown error occurred” when n is 0, 15, 20, or 50.

Also, when I run “flyctl scale count 5” then “flyctl scale count 10” repeatedly, it will sometimes show 5 instead of 10 in the output, and vice versa.

For example :

```auto
flyctl scale count 10
Count changed to 5

```

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [April 26, 2021, 1:37pm UTC](https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278/2 "2021-04-26T13:37:49Z")

</div>

The error happens when `count` is outside the bounds of autoscaling min/max. I created [an issue](https://github.com/superfly/flyctl/issues/406) for this, it _should_ be disabling autoscaling when you run `scale count` manually.

The weird output is probably related. When you run the scale command it actually does the equivalent of a deploy. It’s likely conflicting with autoscaling and giving back weird errors.

---

<div class="post-metadata">

**Author:** ![matthewrobertbell](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/matthewrobertbell/32/574_2.png) [@matthewrobertbell](https://community.fly.io/u/matthewrobertbell)\
**Post date:** [April 26, 2021, 2:14pm UTC](https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278/3 "2021-04-26T14:14:31Z")

</div>

To clarify, I had manually disabled autoscaling, and the output now is:

```auto
flyctl autoscale show
Scale Mode: Disabled

```

So maybe autoscaling isn’t disabled when the above output thinks that it is disabled?

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [April 26, 2021, 2:16pm UTC](https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278/4 "2021-04-26T14:16:12Z")

</div>

It seems like it’s not disabling “new” autoscaling like it should be, despite showing as disabled. I can turn it off for you if you’d like!

---

<div class="post-metadata">

**Author:** ![matthewrobertbell](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/matthewrobertbell/32/574_2.png) [@matthewrobertbell](https://community.fly.io/u/matthewrobertbell)\
**Post date:** [April 26, 2021, 2:22pm UTC](https://community.fly.io/t/flyctl-scale-count-n-gives-an-error-for-some-values-of-n/1278/5 "2021-04-26T14:22:36Z")

</div>

I think I’m going to have two apps, this with autoscaling and a new one with manual scaling for testing, so no action needed. Thanks!
