Healthcheck failing with "service unavailable"
dchavez18
PROOP

4 months ago

We're migrating our website to Railway and are trying to configure Healthcheck on our staging web service.

Setup:

- Rails 8.1 app running on Puma with 2 replicas

- Health endpoint: /up (Rails built-in)

- App listens on port 3000

Issue: On staging, every deploy fails with "1/1 replicas never became healthy". The healthcheck hits /up but gets "service unavailable" on all 11 attempts before the 5 minute retry window expires.

The app has a startup process that clones external git repos and downloads assets before Puma is ready to serve requests. This startup process takes longer than the 5 minute healthcheck window allows.

Logs: ====================

Starting Healthcheck

====================

Path: /up

Retry window: 5m0s

Attempt #1 failed with service unavailable. Continuing to retry for 4m49s ... Attempt #11 failed with service unavailable. Continuing to retry for 8s

1/1 replicas never became healthy! Healthcheck failed!

How can we configure this Healthcheck correctly?

Solved

4 Replies

First off, I remember Thoughtbot from back in the day, welcome! I am sorry that this is welcome you got. Lemme dig in.


Status changed to Awaiting User Response Railway 4 months ago


What happens when you set the healthcheck to the root? say "/"?


angelo-railway

What happens when you set the healthcheck to the root? say "/"?

dchavez18
PROOP

4 months ago

We tried / and it also fails with service unavailable.


Status changed to Awaiting Railway Response Railway 4 months ago


Railway
BOT

4 months ago

Hello!

We've escalated your issue to our engineering team.

We aim to provide an update within 1 business day.

Please reply to this thread if you have any questions!

Status changed to Awaiting User Response Railway 4 months ago


4 months ago

Hello,

You should be able to fix this by disabling SSL redirects in your application's code.


Status changed to Solved jake 3 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...