App/Machine automatically suspended after 7 days working fine

Hi all,

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:

app = xxxxx
kill_signal = “SIGINT”
kill_timeout = 5
mounts =
primary_region = “mad”
processes =

internal_port = 8080
processes = [“app”]
protocol = “tcp”
hard_limit = 25
soft_limit = 20
type = “connections”

force_https = true
handlers = [“http”]
port = 80

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:

Any help is appreciated!

Hi there,

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 :slight_smile: 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.


  • Daniel

Hey again, just a small correction - if you don’t specify auto_start/stop in your fly.toml, the defaults are:

auto_start_machines = true and auto_stop_machines = false.

(This is mentioned in the page I linked to, my bad for not reading properly).

  • Daniel

Hi Daniel, many thanks for all the information!

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

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