Health check before deployment and traffic routing.
mckay
PROOP

10 months ago

Hello, I have a golang GIN application that I am trying ot enable heath check routing for. /health is exposed and returns 200 responses, but the health checks in the railway logs are failing.

==================== Starting Healthcheck

Path: /health

Retry window: 10m0s

Attempt #1 failed with service unavailable. Continuing to retry for 9m49s

Attempt #2 failed with service unavailable. Continuing to retry for 9m38s

Attempt #3 failed with service unavailable. Continuing to retry for 9m26s

Attempt #4 failed with service unavailable. Continuing to retry for 9m12s

Attempt #5 failed with service unavailable. Continuing to retry for 8m54s

Attempt #6 failed with service unavailable. Continuing to retry for 8m28s

Attempt #7 failed with service unavailable. Continuing to retry for 7m48s

Attempt #8 failed with service unavailable. Continuing to retry for 7m8s

Attempt #9 failed with service unavailable. Continuing to retry for 6m28s

Attempt #10 failed with service unavailable. Continuing to retry for 5m48s

Attempt #11 failed with service unavailable. Continuing to retry for 5m8s

Attempt #12 failed with service unavailable. Continuing to retry for 4m27s

Attempt #13 failed with service unavailable. Continuing to retry for 3m47s

Attempt #14 failed with service unavailable. Continuing to retry for 3m7s

I increased from 300 seconds to 600 seconds, but the error persists.

Any suggestions?

Solved

11 Replies

10 months ago

Are you listening on IPv4?


10 months ago

Do you have a PORT variable set to the port your application runs on?


mckay
PROOP

10 months ago

Checking on both


mckay
PROOP

10 months ago

No, just API_PORT

and /health returns a 200 when manually hit btw


10 months ago

Add a PORT variable; API_PORT is nonstandard.


mckay
PROOP

10 months ago

Yes sir


mckay
PROOP

10 months ago

Doing now sir


mckay
PROOP

10 months ago

Deploying the change with the port now and then we'll run a new deployment with the health check enabled and see if it works.


mckay
PROOP

10 months ago

Worked


mckay
PROOP

10 months ago

Appreciate you man @Brody


10 months ago

No problem!


Status changed to Solved brody • 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...