a month ago
I have FastAPI python application. which has /health route
It works fine locally, but it failed in deployment.
6 Replies
a month 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 brody • about 1 month ago
a month ago
Would it be possible to share the repository, as well as a screenshot of your health check settings?
a month ago
When Railway is looking for a health check, it's checking on the root. Do you have it running behind /api? Are you sure that this app is bound to the same port that your domain is bound to?
a month ago
https://docs.railway.com/guides/healthchecks-and-restarts#configure-healthcheck-port
Make sure your app is actually running on the same port as the variable is set to.
a month ago
Oh. Thanks, the endpoint is at the root, but I wasn't aware that the binding port is affecting the health check.
So adding the PORT variable resolved the issue.
Status changed to Solved chandrika • about 1 month ago