One of my app instances died randomly, I am getting only these errors in the logs:
2022-07-28T02:18:20Z proxy[Na4Rxxb6] iad [error]Error: timed out while connecting to app
2022-07-28T02:18:20Z proxy[Na4Rxxb6] iad [error]Error: timed out while connecting to app
2022-07-28T02:18:35Z proxy[Na4Rxxb6] iad [error]Error: timed out while connecting to app
2022-07-28T02:18:37Z proxy[Na4Rxxb6] iad [error]Error: timed out while connecting to app
2022-07-28T02:18:49Z proxy[Na4Rxxb6] iad [error]Error: timed out while connecting to app
2022-07-28T02:19:02Z proxy[Na4Rxxb6] iad [error]Error: timed out while connecting to app
Sure enough if I check the status it says that the health check for the iad location is critical:
App
Name = my-example-app
Owner = my-example-org
Version = 12
Status = running
Hostname = my-example-app.fly.dev
Instances
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
Na4Rxxb6 app 12 iad run running 1 total, 1 critical 0 2022-07-19T17:17:55Z
xoZ634s5 app 12 ewr run running 1 total, 1 passing 0 2022-07-01T19:56:05Z
CQslW63c app 12 yyz run running 1 total, 1 passing 0 2022-06-08T18:16:55Z
And if I check the instance
Instance
ID = Na4Rxxb6
Process =
Version = 12
Region = iad
Desired = run
Status = running
Health Checks = 1 total, 1 critical
Restarts = 0
Created = 2022-07-19T17:17:55Z
Recent Events
TIMESTAMP TYPE MESSAGE
2022-07-19T17:17:44Z Received Task received by client
2022-07-19T17:18:28Z Task Setup Building Task Directory
2022-07-19T17:19:06Z Started Task started by client
Checks
ID SERVICE STATE OUTPUT
219dd48c285e84611f2e717kj tcp-443 critical dial tcp 172.19.36.162:443: i/o timeout
This seems very similar to Any thoughts on why my app randomly died? - #2 by greg but this app is only running nginx.
The only thing I am wondering: Why did the app not automatically restart upon having a failed instance. But it seems that the default for restart_limit
is 0, which means it never restarts. So I will be adding that to my config files, still seems a bit of an odd choice as my developer expectation would be that a failed instance restarts automatically.