Application failed to respond - I'm at a loss
cisahiner
FREEOP

10 months ago

My Node.js + Socket.IO app deploys successfully to Railway but fails with "Application failed to respond" (502) for external traffic. I'm a complete noob and trying to vibe code my way around but I got stuck on this for a whole day now.

The app starts correctly, logs show the server is running, and the / health check endpoint responds with status healthy. But within a second or two, the container is stopped

Why is Railway still stopping my container despite successful health check and no crash?

Solved

12 Replies

cisahiner
FREEOP

10 months ago

project id :5dad23e6-15a4-481d-a97d-0f80ef3e3633


10 months ago

you're running your server on host 0.0.0.0 but you run the internal health check on host ::1 (which in ipv4 is equivalent to 127.0.0.1 )


10 months ago

make sure your healthcheck is checking the host 0.0.0.0 as well


10 months ago

although personally I'd remove or disable that internal health-checking completely, it's completely unnecessary since any proper hosting app (including Railway) has healthchecking built in, you can find it in server settings

Railway's healthcheck is better because it'll also consider whether your app is actually exposed or not which your internal healthcheck cant do


cisahiner
FREEOP

10 months ago

thanks for your reply. i tried that and I do get 200 on health check now, but i still get the same sigterm situation.

1402024145285419058


10 months ago

yea i have no clue what that's about


10 months ago

probably some command or function that's importing from a directory that doesnt exist


10 months ago

(in this case /app)


10 months ago

-# I'm heading to bed right now btw but I'll check back here when I wake up


cisahiner
FREEOP

10 months ago

It works now! i had a custom port in setting in the dashboard that was not matching with the port i have in the code facepalm


10 months ago

oh cool, glad you got it working


10 months ago

!s


Status changed to Solved dev 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...