Issue faced - 502 Bad Gateway
vandhana1106
PROOP

7 months ago

[2025-05-02 12:36:38 +0000] [1] [INFO] Starting gunicorn 23.0.0

May 02 18:06:38

[2025-05-02 12:36:38 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)

May 02 18:06:38

[2025-05-02 12:36:38 +0000] [1] [INFO] Using worker: sync

May 02 18:06:38

[2025-05-02 12:36:38 +0000] [5] [INFO] Booting worker with pid: 5

Hello Railway Support Team,

I’m currently facing an issue with my deployed project. Although the logs show that Gunicorn has started successfully (andListening at: http://0.0.0.0:8080Booting worker with pid: 5), I’m getting a 502 Bad Gateway error when trying to access the live link.

For context:

  • I'm hosting a Django (Python) project through GitHub integration.

  • I'm using the Pro version of Railway.

  • I’ve deployed my Postgres database separately, and that deployment shows as successful.

Additionally, I have a question:
Is it recommended to create two separate Railway projects — one for the Postgres database and another for the Django backend — or is it better practice (and possible) to manage both in the same Railway project?
Right now, I’ve kept them separate, but I want to confirm the best approach going forward.

Thank you in advance for your help!

Solved

1 Replies

brody
EMPLOYEE

7 months ago

Hello,

For the 502 error, please see our docs on that topic - https://docs.railway.com/reference/errors/application-failed-to-respond

For the question, yes you absolutely would want to keep all related services in the same project -

https://docs.railway.com/overview/best-practices#deploying-related-services-into-the-same-project

Best,
Brody


Status changed to Awaiting User Response Railway 7 months ago


Railway
BOT

4 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 4 months ago


Loading...