20 days 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?
4 Replies
20 days ago
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 • 20 days ago
angelo-railway
What happens when you set the healthcheck to the root? say "/"?
20 days ago
We tried / and it also fails with service unavailable.
Status changed to Awaiting Railway Response Railway • 20 days ago
20 days 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 • 20 days ago
20 days ago
Hello,
You should be able to fix this by disabling SSL redirects in your application's code.
Status changed to Solved jake • 4 days ago