7 days ago I deployed this little app and I’ve monitoring it every day. Today I realised it stopped working last night, with nothing special in logs - no error or crash reports. It seems as if the machine has been suspended automatically and after looking first into the community I didnt see nothing similar, since my fly.toml doesn’t include any auto stop property:
[[services.ports]]
force_https = true
handlers = [“http”]
port = 80
[[services.ports]]
handlers = [“tls”, “http”]
port = 443
Why would the application stop working? The code is just some node.js that writes every day into a google sheet, nothing special. It’s been working perfectly until last night. I know I could resume the app so it’ll work again but I’m concerned about this sudden suspension.
This is what I see in the monitoring page:
If you don’t configure auto-stop/start explicitly, the default behavior is to auto-stop when idle and auto-start when a request is received. If you want the application to stay up at all times you have to set auto_start_machines and auto_stop_machines to false.
The interesting question here is: how did your app stay up for 7 days when it’s (implicitly) configured to auto-suspend were you sending a request right before the scheduled processing time, which would wake it up in time to run the periodic task? and did you stop sending those requests the day it seemingly stopped working?
That’s certainly another possibility - you could have something external sending a request to your app in time for it to wake up and do the processing. This might be unreliable though - if you need consistent execution, turning auto-stop/start off is your best bet.
Taking your last comment: if I do not specify auto stop then my app should be running perfectly, right? I “flyctl start machine” 'ed and everything looks right but I still wonder what are the conditions met for my machine/app to be suspended out of the blue… Thanks anyway