proxy[d8d9790b279548] den [error] [PR03] could not find a good candidate within 1 attempts at load balancing. last error: [PC01] instance refused connection. is your app listening on 0.0.0.0:8081? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
I haven’t changed anything in the toml file or similar, any insights about the cause?
2025-08-06T00:49:10.455 proxy[2866994fe413e8] den [error] [PC01] instance refused connection. is your app listening on 0.0.0.0:8080? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
Hm… The other Machine was saying port 8081. What does your fly.toml look like?
Also, it probably help to post the outputs of fly m list and fly services list, so we in the forum have a better idea of what regions you’re in, and the like…
Yeah in my desperation I tried adding the [[services]] config, now I tried without it again and I still get the error log in the machines when deploying:
2025-08-06T01:42:41.017 proxy[d8d9790b279548] scl [error] [PR03] could not find a good candidate within 1 attempts at load balancing. last error: [PC01] instance refused connection. is your app listening on 0.0.0.0:8080? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
That’s the weird part, the requests and app work regardless, but I’ve been having 504 errors from the API and I’m suspecting it could be because of this.
The API anomalies might not be related (although possibly I’m misunderstanding what you’re referring to there).
If the app that you’re getting these errors in doesn’t use volumes, then I would try destroying the two Machines that have been mentioned in the logs so far (d8d9790b279548 and 2866994fe413e8)—and then recreating them.
More broadly, see if there’s some correlation with Machines, regions, and the like…
You can use the client-side Fly-Prefer-Region and Fly-Force-Instance-Id headers to steer requests to particular locales.