Machine downscaled even if a process is running

Hello, I’m hosting a Remix js App here on Fly.io where I have long node processes.
I’m using the autoscaling (to zero) to keep costs lows, but today I’ve noticed that machines are downscaled even if my long running node js processes are still running.

Should I keep at least 1 machine always up or there are other settings?

Thanks

afaik the autoscaler(proxy) works based on network traffic, and long running processes inside your vms are invisible to the autoscaler, which is why your vm is being shutdown.

Here’s what I think you can do.

  • You can disable scale-to-zero and update your application to shut down the VM when it’s done running.
  • Then, you can delegate the starting of your application to the autoscaler, by setting the auto_start_machines = true

You can find more on autostart and autostop here