I successfully deployed the application and it was working, but now i got 502 Bad Gateway error
amedaimigh
PROOP

a month ago

I successfully deployed the application and it was working, but now i got 502 Bad Gateway error https://hiretrack-production-50d6.up.railway.app/

$20 Bounty

2 Replies

Railway
BOT

a month ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 26 days ago


fra
HOBBY

a month ago

Can you please check that the port exposed by the app is the same used in Settings->Networking->Public network?


dev-charles254
PRO

a month ago

Hi! A 502 Bad Gateway usually means the Railway proxy can't talk to your application. Since it worked initially, here are the quickest things to check and fix:

  1. Check the Port & Host Bindings
  • Make sure your app listens on host 0.0.0.0 (not localhost or 127.0.0.1).
  •   * Verify that the port your code listens on matches the PORT environment variable or the Target Port set in your Railway service settings.
  1. Inspect the Application Logs
  • Go to your Railway dashboard, click on the service, and look at the Logs tab.
  •   * Look for any crash messages, unhandled exceptions, or memory-limit exits that happened right after deployment.
  1. Database or API Connection Issues
  • If your app tries to connect to a database or external API on startup and times out, it might cause the server to hang or crash, triggering a 502.

Welcome!

Sign in to your Railway account to join the conversation.

Loading...