[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

Hello,

While I develop pretty well, deploying things is not something I often do so bear with me.

I’ve deployed a laravel app for staging purposes. It uses inertia with svelte. The deployment itself goes through fine and I get to the point where I have 2 apps running (why 2? I don’t care for staging…)

However, hitting the new endpoints says 502, and I have these in the logs:

2024-12-16T01:26:30Z proxy[7815616f4675d8] syd [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)
2024-12-16T01:26:30Z proxy[7815616f4675d8] syd [error][PR04] could not find a good candidate within 21 attempts at load balancing

I’ve tried a bunch of different env variables, to no avail:

APP_URL = 'https://<app>.fly.dev/'
APP_ENV = 'staging'
APP_HOST = "0.0.0.0"
SERVER_HOST = "0.0.0.0"
HOST = "0.0.0.0"
APP_PORT = "8080"
SERVER_PORT = "8080"
PORT = "8080"

When I SSO into the box and execute php artisan serve I get app hosted on 0.0.0.0:8080 so that seems fine. How is fly actually serving this content? Is it running? I am confused.

Maybe it’s just slow to start, it doesn’t seem to affect the app running. Curious that php and nginx need to much additional time to spin up.