Instance or service not restarted when I expected it to

This may not be the case here (as it shows as pending) however I found that when my app randomly failed (in my case a random spike but would be the same for memory) they did not get restarted. I too was expecting they would have.

The fix was simple: add a healthcheck to your fly.toml (tcp and/or http, depending on your app) and make sure that has a restart_limit set. Since the default is 0. Which disables restarts:

  • restart_limit: The number of consecutive TCP check failures to allow before attempting to restart the VM. The default is 0, which disables restarts based on failed TCP health checks.

See:

Upping the RAM to 4GB will also fix it. Just a more expensive way :slight_smile:

1 Like