I am experiencing a persistent 502 Bad Gateway error on my web application service.

larrysit0
HOBBY

a month ago

PROYECT URL : alarma2-production.up.railway.app

serice name: alarma2

You reached the start of the range โ†’ Aug 7, 2025, 12:44 PM

Aug 07 12:45:43

Starting Container

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [1] [INFO] Starting gunicorn 23.0.0

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [1] [INFO] Using worker: sync

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [4] [INFO] Booting worker with pid: 4

Aug 07 12:45:44

--- DEBUG: servidor.py: INICIO DEL SCRIPT ---

Aug 07 12:45:44

--- DEBUG: servidor.py: Instancia de Flask creada ---

Aug 07 12:45:44

--- DEBUG: TELEGRAM_BOT_TOKEN detectado. ---

Aug 07 12:45:44

--- DEBUG: COMUNIDADES_DIR establecida a: comunidades ---

I have performed extensive debugging and have confirmed the following:

  • My service logs show that Gunicorn starts correctly and is listening on http://0.0.0.0:8080.

  • There are no application-level errors in the logs. The server starts successfully.

  • Despite the successful startup, the service consistently returns a 502 error when accessed via the public URL.

I believe this is an issue with your platform's internal proxy or network routing, as my application appears to be running as expected inside the container.

Could you please investigate the connection between your load balancer and my running container?

Thank you for your help.

Solved$10 Bounty

7 Replies

Railway
BOT

a month ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


larrysit0
HOBBY

a month ago

that's what i am getting on screen

Attachments


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 brody โ€ข 26 days ago


larrysit0
HOBBY

a month ago

Hello,

I am experiencing a persistent 502 Bad Gateway error on my web application service.

Here are the details of my project:

I have performed extensive debugging and have confirmed the following:

  • My service logs show that Gunicorn starts correctly and is listening on http://0.0.0.0:8080.

  • There are no application-level errors in the logs. The server starts successfully.

  • Despite the successful startup, the service consistently returns a 502 error when accessed via the public URL.

I believe this is an issue with your platform's internal proxy or network routing, as my application appears to be running as expected inside the container.

Could you please investigate the connection between your load balancer and my running container?

Thank you for your help.


larrysit0
HOBBY

a month ago

You reached the start of the range โ†’ Aug 7, 2025, 12:44 PM

Aug 07 12:45:43

Starting Container

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [1] [INFO] Starting gunicorn 23.0.0

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [1] [INFO] Using worker: sync

Aug 07 12:45:44

[2025-08-07 17:45:43 +0000] [4] [INFO] Booting worker with pid: 4

Aug 07 12:45:44

--- DEBUG: servidor.py: INICIO DEL SCRIPT ---

Aug 07 12:45:44

--- DEBUG: servidor.py: Instancia de Flask creada ---

Aug 07 12:45:44

--- DEBUG: TELEGRAM_BOT_TOKEN detectado. ---

Aug 07 12:45:44

--- DEBUG: COMUNIDADES_DIR establecida a: comunidades ---


a month ago

Hey did you checked that the domain is routing the traffic to the right port ? Sometimes Railway tries to automatically detect the listening port but it can fails if they are multiple ports opened for some reason


larrysit0
HOBBY

a month ago

yes it works thank you so much


larrysit0
HOBBY

a month ago

resolved


Status changed to Solved jake โ€ข 26 days ago


I am experiencing a persistent 502 Bad Gateway error on my web application service. - Railway Help Station