a month ago
I'm deploying an oTree application on Railway with two server instances running in parallel. The application is a thesis project using oTree framework. I have two services configured:
web: Runningotree prodserver1of2capable-possibility: Should runotree prodserver2of2
Both services are deployed from the same GitHub repository and share the same database configuration.
The capable-possibility service keeps failing deployment with a healthcheck failure. The deployment logs show:
Attempt #1-14 failed with service unavailable
1/1 replicas never became healthy!
Healthcheck failed!
The service never starts, so the healthcheck endpoint is unreachable. I tried changing the healthcheck path from /robots.txt to /server_check to /demo, but the service still fails because it's not running at all.
The web service has a start command configured (otree prodserver1of2), but capable-possibility had no start command set. Without a start command, the container doesn't know how to start the application, so it crashes immediately before the healthcheck can even run.
Is there a way to prevent this ?
Pinned Solution
a month ago
Set otree prodserver2of2 as a start command for your capable-possibility service. And fix the healthcheck path by setting it to / or a specific endpoint your oTree app serves.
3 Replies
Status changed to Open Railway • about 1 month ago
a month ago
Have you tried setting a custom deploy command in service configurations? (Make sure to redeploy after)
a month ago
Set otree prodserver2of2 as a start command for your capable-possibility service. And fix the healthcheck path by setting it to / or a specific endpoint your oTree app serves.
0x5b62656e5d
Have you tried setting a custom deploy command in service configurations? (Make sure to redeploy after)
a month ago
Fixed thanks guys!
Status changed to Solved brody • about 1 month ago