The below is an example of a suite of apps deployed on Fly. They are non-public services that only listen to pubsub streams and index data. However, they have been suspending after a period of time ranging from 1 hour to 12 hours.
They will always suspend gracefully, without any of my code being the culprit.
app = 'x'
primary_region = 'iad'
[experimental]
cmd = ['./tfi']
[build]
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 2
processes = ['app']
[[vm]]
size = 'shared-cpu-8x'
Even with such a configuration, the instances would keep terminating. Not sure why, but my logs clearly show that there was a termination command sent (Graceful shutdown). Are we missing anything in our configuration, thanks!
Been attempting various tactics like the auto_start_machines option and keeping 2 instances running rather than 1.
2024-04-07T02:55:00.530 app[x] iad [info] Application stopped
2024-04-07T02:55:00.867 app[x] iad [info] INFO Main child exited normally with code: 0
2024-04-07T02:55:00.880 app[x] iad [info] INFO Starting clean up.
2024-04-07T02:55:00.881 app[x] iad [info] [x] reboot: Restarting system
2024-04-07T02:55:01.022 runner[x] iad [info] machine exited with exit code 0, not restarting