2 years ago
I deployed a backend service (Python FastAPI) and I generated a public url, but every time i make a request to the api or click on the link I get the error: 502 Application failed to respond.
The backend code and service are running with no errors, I am 100% sure and that is because I deployed the exact same service using the same github repo in a different project and the only difference is I did not expose the service, instead I deployed a frontend service with it and I exposed the frontend. The frontend is working fine and the backend is responding fine (the frontend is reaching the backend using the private network).
However in this project, I deployed only the backend and the only difference is that I clicked on generate a public url so I can reach the backend from my local computer, but it keeps giving me 502 error (I have already added the env var PORT 8000) and made sure everything is configured properly but still no luck. Please assist and many thanks in advance.
2 Replies
2 years ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open ray-chen • over 1 year ago
2 years ago
Hey, could you try re-deploying or setting the PORT to something else (e.g. 8123)?
2 years ago
Gonna close this thread in favour of the duplicate newer thread with more details and an answer -
https://help.railway.app/questions/how-to-expose-a-fast-api-backend-service-a1712631
Status changed to Closed brody • over 1 year ago