my machine keeps getting suspended after few days and I want to get notified when this happens is there a setting for that?
suspended means that it was auto-stopped after not receiving any requests for a while. There are no notifications when a machine gets suspended due to auto-stop behavior, since it’s working as configured. That said, if you want the machine to stay up at all times, you can set
false and then
fly deploy to apply the new configuration.
Your current configuration looks like this, notice machines are set to auto_stop and auto_start:
[http_service] auto_start_machines = true auto_stop_machines = true force_https = true internal_port = 8_080 min_machines_running = 0
Let me know if that clarifies things!
@roadmr thanks for your answer. My app is migrated to v2 but I haven’t changed fly.toml. Here is contents of my fly.toml
# fly.toml file generated for twilight-frog-9274 on 2021-11-21T22:19:05Z app = "twilight-frog-9274" kill_signal = "SIGINT" kill_timeout = 5 processes =  [env] PORT = "8080" [experimental] allowed_public_ports =  auto_rollback = true [[services]] http_checks =  tcp_checks =  script_checks =  internal_port = 8080 processes = ["app"] protocol = "tcp" [services.concurrency] hard_limit = 25 soft_limit = 20 type = "connections" [[services.ports]] handlers = ["tls", "http"] port = 443
So there is nothing related with auto-stop behaviour here and this machine occasionally is getting suspeneded which breaks my workflows
Ah, you are right. Since it was just restarted I see no information in the logs about why it might have stopped the last time, is it possible your application exited by itself?
I would suggest keeping an eye on the logs (
fly logs) so next time it stops you can look for some clues there, there will be an indication of what happened (for example, if it was stopped automatically it will say “scaling down from 1 to 0 machines”, though as you noted, your config shows that’s not likely the case).
@roadmr when I realise my machine is suspended I go to logs and I can’t see anything in there. I think its very important to be able to get some kind of alert when machine changes its state. Now I have to implement my own alarm/health check here.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.