I can’t get the services.http_checks to work and I don’t understand why. When deploying, the check would always fail with this error:
Error: failed to update machine 683d56ea707218: Unrecoverable error: timeout reached waiting for health checks to pass for machine 683d56ea707218: failed to get VM 683d56ea707218: Get "https://api.machines.dev/v1/apps/xxx/machines/683d56ea707218": net/http: request canceled
and from the Live Logs page, it says:
Check Status Output Updated
servicecheck-00-http-8080 warning waiting for status update 2024-09-19 16:05:48
The app is running fine without error and I can access the web page.
Hi… You have an overlap in the [http_service] and [[services]] definitions, which often confuses the Fly.io infrastructure. I’d suggest merging the former into the latter.
(The protocol may need tweaking as well, but I don’t do much with health checks, myself.)
Health check on port 8080 has failed. Your app is not responding properly. Services exposed on ports [80, 443] will have intermittent failures until the health check passes.
Health check on port 8080 is in a 'warning' state. Your app may not be responding properly. Services exposed on ports [80, 443] may have intermittent failures until the health check passes.
Hm… This looks similar to the following older post:
I think you really only want protocol = 'https' in the unusual case of when your own web app is handling SSL itself (instead of letting the Fly edge proxy handle it).
(A lot of the settings in fly.toml look at things from the Fly edge proxy’s perspective.)