health checks are too slow
vasallius
HOBBYOP

3 months ago

1bac7620-d734-444f-b80d-27b576415c24

$10 Bounty

7 Replies

vasallius
HOBBYOP

3 months ago

image.png

Attachments


vasallius
HOBBYOP

3 months ago

image.png

Attachments


vasallius
HOBBYOP

3 months ago

i have tried:

  • restarting
  • redeploying

vasallius
HOBBYOP

3 months ago

confirmed that sever is in singapore region (i am hitting it from the philippines)



vasallius
HOBBYOP

3 months ago

see this as well


Anonymous
PROTop 10% Contributor

23 days ago

The screenshots actually look healthy rather than slow: /health is returning 200, mostly around 166-472ms, and the manual GET screenshot is still a 200 at about 874ms. From the Philippines to a Singapore region service, that round trip is plausible; it is not usually enough to make Railway mark a healthcheck as failed.

A few things to separate:

  1. Railway healthchecks are deployment readiness checks, not continuous monitoring. Railway waits for the configured endpoint to return HTTP 200 before moving traffic to the new deployment.
  2. If deployments are failing healthchecks, check that the configured health path is exactly /health, the app listens on the PORT Railway provides, and any host allowlist includes healthcheck.railway.app.
  3. Keep /health shallow. It should only prove the process can serve traffic. Avoid database calls or third-party API calls there unless you intentionally want those dependencies to block deploys.
  4. The 404 on /favicon.ico in the screenshot is unrelated.

For user-facing latency, test the public endpoint separately with something like:

curl -sS -w "status=%{http_code} total=%{time_total}s" -o /dev/null https://YOUR_DOMAIN/health

If that is consistently high from the user location, the fix is region/CDN/caching, not the Railway healthcheck setting itself. If Railway itself says the healthcheck failed, the most useful next screenshot is the deployment event/log line that shows the healthcheck failure reason.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...