App doesn't stop & instance refused connection issues

Hi there,

My app doesn’t stop when idle. Everything seems to be well configured :

  protocol = "tcp"
  internal_port = 8080
  processes = ["app"]
  auto_stop_machines = true
  auto_start_machines = true

I’ve got this error in my logs : "instance refused connection. is your app listening on make sure it is not only listening on (hint: look at your startup logs, servers often print the address they are listening on)" and I think it’s related (as I read in the docs that it was fly proxy that manages stop and restart of apps V2). I have no clue where to deal with this…

Any help would be very appreciated!


Hey there,

I see that you are having some issues with your app. Just wanted to say that you are correct in the sense that fly proxy is what manages the auto stop/start machines. I would take a look at this post here that was made and see if that helps-[error]instance refused connection..

Here are some docs for reference to your issue as well:

  1. Automatically Stop and Start Machines · Fly Docs.
  2. Connect to an App Service · Fly Docs
  3. flyctl logs · Fly Docs
1 Like

Thx for your answer and your references, it helped!
I had some trouble with port config in my fly.toml
[[services]] protocol = "tcp" internal_port = xxxx was defined twice (don’t remember why but anyway).
Deleting one of the two configs solves the issue.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.