19 days ago
Deployment be929b7c returns 502 errors despite successful startup. Logs show Uvicorn running on 8080, but all requests fail with "x-railway-fallback: true".
Tested with minimal FastAPI app (2 endpoints only), no middleware, no health checks, both us-west1 and asia-southeast1 regions. Same result every time.
Similar to this solved thread but solution not documented:
https://station.railway.com/questions/app-deploys-successfully-but-returns-502-1cedac14
Anyone know what fixed it?
7 Replies
19 days ago
Can you share your deployment logs and the GitHub URL?
19 days ago
19 days ago
Cheater.
19 days ago
Depends. I knew it was likely that issue, so I could have sent the link without looking.
19 days ago
I don't like to assume <:sad_hamster:1280780987504267328>
19 days ago
Not my first rodeo.
Thanks — that doc fixed it. I had Uvicorn starting on the wrong port/host. I changed my start command to:
```uvicorn main:app --host 0.0.0.0 --port ${PORT:-8080}````
and updated the Railway service target port to 8080. After redeploy the edge returns 200. Logs now show Uvicorn listening on 0.0.0.0:8080. Appreciate the pointer — saved me a lot of time.
Status changed to Solved brody • 18 days ago