502 Bad Gateway - Container returning errors for all requests
shreefoods71-debug
HOBBYOP

a month ago

Project: soothing-joy (saas-landing)

Service: voice-agent-production

Issue: ALL HTTP requests return 502 "Application failed to respond"

Details:

  • Even a minimal Express.js server fails with 502
  • Server code works perfectly locally with node server.js
  • Build logs show Docker image builds successfully
  • Container logs show application starts ("Email Dashboard → http://localhost:3000/email")
  • But all incoming requests return 502
  • Error response header shows: x-railway-fallback: true

Diagnostics tried:

  • Removed memory limit (was --max-old-space-size=460)
  • Changed binding to 0.0.0.0
  • Tested with minimal Express server (just /health endpoint)
  • All still return 502

GitHub repo: https://github.com/anthropics/claude-code

Questions for Railway team:

  1. What causes silent container failures even for minimal servers?
  2. Can you provide actual container stdout/stderr logs?
  3. Any known issues with Node.js 20-alpine on Railway?

The application code is correct - this is a Railway environment issue that requires actual container logs to debug.

$10 Bounty

1 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 1 month ago


Your application should be listening on 0.0.0.0 instead of localhost.

Also, try deleting the URL, then add it back on the port.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...