Health Check failed

nushghulyan
PRO

a month ago

I have FastAPI python application. which has /health route
It works fine locally, but it failed in deployment.

Solved$10 Bounty

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


Would it be possible to share the repository, as well as a screenshot of your health check settings?


nushghulyan
PRO

a month ago

You can see the health check path and logs here.

Attachments


nushghulyan
PRO

a month ago

And here is the simple route for the health-check

Attachments


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?


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.


nushghulyan
PRO

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


Health Check failed - Railway Help Station