a year ago
I have FastAPI python application. which has /health route
It works fine locally, but it failed in deployment.
Pinned Solution
a year 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.
6 Replies
a year 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 year ago
a year ago
Would it be possible to share the repository, as well as a screenshot of your health check settings?
a year ago
And here is the simple route for the health-check
Attachments
a year 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 year 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 year 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 year ago
