Health check & sveltekit

in my yarn start I have:

svelte-kit preview --port $PORT --host 0.0.0.0

And in the logs I see that my website is started:

local: http:// localhost:10000
network: http:// 10.201.190.60:10000

Perfect, the website is publicly available.

Now, I enable “health check” but my deploy is pending in progress with:

Waiting for health check to return a successful response code at: http://0.0.0.0:10000/heathz
I guess that is not checking the right place… if he would check http://localhost:10000/heathz, it would working I guess.

Any help?

Hi @jycouet,

Can you share with me the name of the service that is using this health check? Make sure that you have the path set in your Settings and that the path returns a 200 response.

Hi,

Yes my path is returning 200 ok localy.
The service is a “Web service” “node”.

I guess hat is issue is coming from the fact that it’s checking at 0.0.0.0 and not localhost or 10.201.190.60

AFAIK you’re not meant to use svelte-kit preview in production, instead opting for SvelteKit’s adapters and pointing the service to the /build directory. Could that be the reason the health check isn’t working?

It looks like you might have a typo in your health check. heathz instead of healthz

1 Like

Hi @jycouet

Assuming it is not just a type as @jake pointed out, could you clarify how you configured the health check endpoint. Do you set one in a render YAML ( healthCheckPath) and what is the exact value you set? Also, where do get the message that it is waiting for http://0.0.0.0:10000/heathz ?

Thx for all your help.
It was only my typo issue.

The svelte-kit preview is working like a charm.

1 Like