Healthcheck fails
steffendsommer
PROOP

a year ago

Trying to set up healthcheck across my services but running into issues. Works fine on my Next.js service, but fails on my NestJS service. By the logs, I can see that at the time it's done building (and healthcheck starts) NestJS logs that it's ready. If I go to url myself it also works fine.

Build logs

=== Successfully Built! ===

Run:

docker run -it europe-west4.registry.rlwy.net/db4b59e2-7253-4b9d-992d-85ef6c7a3595:04387681-b8fc-429f-bba7-f4eb1199ec7e

Build time: 2.56 seconds

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

Starting Healthcheck

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

Path: /api/health

Retry window: 5m0s

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

Attempt #2 failed with service unavailable. Continuing to retry for 4m37s

Attempt #3 failed with service unavailable. Continuing to retry for 4m25s

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

Attempt #5 failed with service unavailable. Continuing to retry for 3m52s

Attempt #6 failed with service unavailable. Continuing to retry for 3m25s

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

Attempt #8 failed with service unavailable. Continuing to retry for 2m4s

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

Attempt #10 failed with service unavailable. Continuing to retry for 44s

Attempt #11 failed with service unavailable. Continuing to retry for 3s

1/1 replicas never became healthy!

Healthcheck failed!

Deploy logs

[Nest] 395 - 02/18/2025, 9:26:34 PM LOG [NestApplication] Nest application successfully started +1381ms

Stopping Container

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

3 Replies

a year ago

Hello,

Please see our documentation on this topic -

https://docs.railway.com/guides/healthchecks-and-restarts#configure-healthcheck-port

Best,
Brody


Status changed to Awaiting User Response Railway about 1 year ago


steffendsommer
PROOP

a year ago

Thank you for the quick response - that fixed it


Status changed to Awaiting Railway Response Railway about 1 year ago


a year ago

Awsome!


Status changed to Awaiting User Response Railway about 1 year ago


Status changed to Solved brody about 1 year ago


Loading...