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

a year 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

a year ago

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


a year 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 )


a year ago

make sure your healthcheck is checking the host 0.0.0.0 as well


a year 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

a year 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


a year ago

yea i have no clue what that's about


a year ago

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


a year ago

(in this case /app)


a year ago

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


cisahiner
FREEOP

a year 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


a year ago

oh cool, glad you got it working


a year ago

!s


Status changed to Solved dev 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...