Health check fails but no restart

Hello,

I’m currently experiencing some issues with my app sometimes it stops responding, and the following service health check fails. Restarting the machine seems to “fix” the issue:


[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "1s"
restart_limit = 0

I initially thought I just needed to change restart_limit to automatically restart the machine, but it looks like this configuration option has been removed.

So I’m wondering: how can I trigger a machine restart when the health check is failing? I came across Autostop/autostart Machines · Fly Docs, but it doesn’t seem to address what I’m looking for.

Hi… The Fly.io platform doesn’t have a knob for this, although many people assume (as you did) that it would exist somewhere:

However your Machines won’t automatically restart or stop due to failing their health checks, this needs to be done manually.

(Here their doc is using the word “manual” in the sense of “inconvenient”: you would have to set up your own, custom automated mechanism, e.g., a background process within the Machine that does its own TCP probes periodically.)

Oh ok that’s quite unexpected.. but thank you for the anwser

1 Like