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