health
chizoalban2003-beep
HOBBYOP

3 months ago

Trying to deploy this project but it returns the same error each time:https://github.com/chizoalban2003-beep/Git/agents?author=chizoalban2003-beep

Attachments

$10 Bounty

4 Replies

Status changed to Awaiting Railway Response Railway 3 months ago


Status changed to Open Railway 3 months ago


crinalalt-cloud
FREE

3 months ago

1.Make sure the app listens on process.env.PORT not a hardcoded port number

2.Add a /health route that just returns a 200 status

3.Scroll up in the build logs above the healthcheck section and check if the app is crashing before it even starts,there might be a missing env variable or broken import causing it


3 months ago

Need more info, this could be generic, I can see you already have the /health route, could be app is crashing, or port is not configurated properly


arcy35
FREE

3 months ago

build is fine its failing at the healthcheck which usually means the app never started properly

either it’s crashing before app.listen() (check logs above that part), or it’s not binding right

make sure you’re doing:

app.listen(process.env.PORT, '0.0.0.0')

if you don’t see any “server started” log before the healthcheck then its probably crashing on startup


3 months ago

Besides the other users suggestions, try manually setting a PORT variable into that service env vars.

See: https://docs.railway.com/deployments/healthchecks#configure-the-healthcheck-port


Welcome!

Sign in to your Railway account to join the conversation.

Loading...