can't deploy to multiple regions anymore

I had a web app that was running in two regions. I ended up deleting it and recreate with pretty much the same configuration:

❯ fly autoscale standard -a sumiu-web
     Scale Mode: Standard
      Min Count: 1
      Max Count: 10
...
❯ fly regions list -a sumiu-web
Region Pool:
fra
gru
Backup Region:

In the past, I would run fly scale count 2 -a sumiu-web and it would spin up a new instance in the second region. Now, when I do it, I get this message:

❯ fly scale count 2 -a sumiu-web
Warning: Autoscaling is now disabled for sumiu-web

Count changed to 2

and a new app spins up on the same primary region

Did something change?

I’m not entirely sure if this is related but I was playing around with the processes key and I ended up changing the Scale tab to this now:

I changed it back to run the app with CMD ${SERVER_COMMAND} so there is no web, worker or agent anymore running.

Hi @luizkowalski, have you tried fly scale count 2 --max-per-region=1?

it does nothing
it says Count changed to 2 but I only see one instance in fra. nothing on gru

edit: weird… I set --max-per-region=2 and scaled it to 4 and I only see two on fra, nothing on gru yet

Long shot: does your app use volumes?

no, it doesn’t

Another one: does fly.toml have a [processes] section in it still? If so, can you try removing it and redeploy?

it has but it is commented out, I mentioned before that I’m using the CMD on dockerfile then passing $SERVER_COMMAND to it

hey @catflydotio, do you have more ideas? is this related to this (Autoscaling not distributing properly - #3 by jerome) maybe?

things are getting strange by the minute, now when I scale to 2, or even 3, absolutely nothing happens.

We did have a recent bugfix for autoscaling, as in that thread. The problem you’re seeing still looks like it could be issue with switching to using processes and back, though.

Do you mind trying this and letting us know the result?

fly scale count app=4 --max-per-region=2

I got this message

❯ fly scale count app=4 --max-per-region=2 -a sumiu-web
Warning: Autoscaling is now disabled for sumiu-web

Count changed to 4

And there are only two VMs

OK, so, it looks like it was an edge case to do with switching to multiple processes and back, and the app process only had one region: fra. We’ve gone in and cleaned that up on your app, so you should see the four instances, two in each region, now.

not sure if you did something already but now fly scale count app=2 -a sumiu-web spins up one more instance in gru, as expected.

edit: ah, there you go! hahahaha thanks a lot, @catflydotio

1 Like

:tada: I can’t take credit for the fixing. Had to escalate that one pretty far.

The processes feature is in preview and has a lot of edge cases. Your app had configuration left over from trying that. I think you might have been able to sort it with something like fly regions set fra gru --group app, but there might have been more leftovers to find.

1 Like