Healthchecks failing
carlos-worfac
FREEOP

a month ago

Healthchecks keep failing even though everythink looks good and it's working in local, is railway working correctly or is it down?

Solved$10 Bounty

3 Replies

Railway
BOT

a month ago

Your workspace subscription is currently in an INACTIVE state, which means your "todo-api" service has no recent deployments or logs. Healthchecks will fail if the service isn't actively running. You can resubscribe from your workspace billing settings to get your services running again, and make sure your app listens on the PORT environment variable and returns HTTP 200 on your configured healthcheck path as described in our healthcheck docs.


Status changed to Awaiting User Response Railway about 1 month ago


Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Open Railway about 1 month ago


domehane
FREE

a month ago

Hello carlos,

the most common reasons healthchecks fail even when everything works locally are your app is probably not listening on the PORT environment variable that railway injects, you need to make sure your app uses that exact variable , also railway sends healthcheck requests from the hostname healthcheck.railway.app so if your app restricts traffic by hostname you need to allowlist that lastly make sure your healthcheck path actually returns a 200 status code. these are the three things to check first

Hope this help you :)


carlos-worfac
FREEOP

a month ago

Hey, thanks for the quick response! Turns out the issue was on my end, a misconfigured middleware that was intercepting the healthcheck request before it could reach

the endpoint. All sorted now, appreciate the help!


Status changed to Solved carlos-worfac about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...