I’ve deployed a Discord bot on fly.io a long time ago. Today I had decided to migrate the app from v1 to v2. But as soon as I migrated the app, I ran into some trouble and deleted the whole app, and then recreated it. But now in each 10-15 mins it keeps getting “Supended” (The status changes to suspended, and all VMs stop). Then in about 5 minutes it restarts. But this downtime is not acceptable cause the bot may be failing to respond to commands during this time.
What is causing this issue and how can I fix this? Or possibly, how can I go back to v1?
Your app has auto_stop_machines and auto_start_machines set to true, which is the default for new V2 apps. With these settings, machines are downscaled when there are no incoming requests and started back when there are incoming requests.
If you also need to do some background processing in your app outside of incoming requests context, you may want to set them to false.