Unable to restart the app

I cannot restart my app, I used fly scale count 0 but the restart command seems to not be working, how do I restart my app?

adding to this:
how do I setup my app to listen on this?
instance refused connection. is your app listening on make sure it is not only listening on (hint: look at your startup logs, servers often print the address they are listening on)

My app is using NodeJS

Hi @xun

If you try to restart your app when you have zero machines (i.e. scaled to 0), then there is nothing to restart. When you scale up again, your app will get new Machines and essentially be restarted. The fly apps restart command only works when there are existing Machines.

For the port error, you need to make sure that your app is listening on the same port as the internal_port setting in your fly.toml file. There’s more info about this here: Troubleshooting your deployment · Fly Docs

1 Like

Thankyou for your response < I appreciate it!

I should have also added that when you’re at zero Machines, you need to run fly deploy to get your app going again. And then you can use fly scale count to scale.

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