#Application failed to respond

15 messages · Page 1 of 1 (latest)

vernal violet
#

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

strange creekBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

vast falconBOT
#

Project ID: N/A

vernal violet
wheat wolf
#

I see the problem, can you provide me with your current start command so I can fix it up?

vernal violet
#

Start command: uvicorn main:app --host 0.0.0.0 --port 10000

wheat wolf
#

uvicorn main:app --host 0.0.0.0 --port $PORT

#

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

vernal violet
#

Oh so I should replace it with $PORT?

wheat wolf
#

I have already done that for you, use the start command I sent

vernal violet
#

Ohh I see.. thanks lemme try it

wheat wolf
vernal violet
#

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!

wheat wolf
#

no problem, happy to help 🙂