Application failed to respond - I'm at a loss

cisahiner
FREE

24 days 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

0 Replies

cisahiner
FREE

24 days ago

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


24 days 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 )


24 days ago

make sure your healthcheck is checking the host 0.0.0.0 as well


24 days 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
FREE

24 days 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.

1402024145285419000


24 days ago

yea i have no clue what that's about


24 days ago

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


24 days ago

(in this case /app)


24 days ago

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


cisahiner
FREE

24 days 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


24 days ago

oh cool, glad you got it working


24 days ago

!s


Status changed to Solved dev 24 days ago


Application failed to respond - I'm at a loss - Railway Help Station