502 problems
theproventor
HOBBYOP

a month ago

Title: Flask API shows "Application failed to respond" despite Active deployment

Message:

Hi, I've been struggling with this issue for a long time and need help.

My Flask API keeps giving "Application failed to respond" (502) even though Railway shows it as Active with "Deployment successful".

Setup:

Flask + pg8000 (pure Python PostgreSQL driver)

Python 3.13 via Nixpacks

PostgreSQL database in same project

DATABASE_URL variable is set and linked to Postgres

requirements.txt:

flask==3.0.0

flask-cors==4.0.0

pg8000==1.30.3

gunicorn==21.2.0

Deploy logs show NO errors:

Starting Container

Listening at: http://0.0.0.0:8080

Booting worker with pid: 2

But visiting the URL gives "Application failed to respond".

What I've tried:

psycopg2-binary → libpq.so.5 error

Dockerfile with python:3.11-slim

NIXPACKS_PYTHON_VERSION=3.11

PORT=8080 variable

Anyone know what's going on?

1 Replies

Anonymous
FREE

a month ago

Error


Welcome!

Sign in to your Railway account to join the conversation.

Loading...