Application failed to respond
Hey guys. So I'm building a simple FastAPI application connected with Zapier to summarise incoming newsletters to a Notion db.
The app seems to have run as I do get:
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:10000 (Press CTRL+C to quit)
in deploy logs.
But on the hosted URL, I get Application failed to respond and on Zapier I get a 502 error. I have added the start command uvicorn main:app --host 0.0.0.0 --port 10000 for the FastAPI app. Any help appreciated thanks
12 Replies
Project ID:
N/A
I see the problem, can you provide me with your current start command so I can fix it up?
Start command: uvicorn main:app --host 0.0.0.0 --port 10000
Solution
there ya go
railway assigns the PORT variable to what it expects your app to be listening on, otherwise railway won't know how to connect to your app and you will see the railway error page
Oh so I should replace it with $PORT?
I have already done that for you, use the start command I sent
Ohh I see.. thanks lemme try it
if you wanna read a slightly more in depth explanation on this, you can check out this docs page
https://docs.railway.app/troubleshoot/fixing-common-errors
Thanks a lot Brody this worked. I'm getting some logical issues which I'll look into but really appreciate the quick and prompt resolution!
no problem, happy to help 🙂