Skip to content
Error 502 in fastapi after deploy
kevinkeyssx
OP

2 years ago

requestId:"YE8XdW9-TCq5jUMk3yXS8w_603524580"

timestamp:"2024-11-30T03:53:48.015173231Z"

method:"GET"

path:"/"

host:"profile-back-production.up.railway.app"

httpStatus:502

upstreamProto:"HTTP/1.1"

downstreamProto:"HTTP/2.0"

responseDetails:"failed to forward request to upstream: connection refused"

totalDuration:56

upstreamAddress:"http://192.168.0.34:5541"

clientUa:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"

upstreamRqDuration:56

txBytes:4689

rxBytes:919

srcIp:"xxx.xxx.xx.xxx"

edgeRegion:"us-east4"

8 Replies

2 years 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 • almost 2 years ago


2 years ago

In your service settings, can you try switching to the V2 runtime please -


kevinkeyssx
OP

2 years ago

I already made the change and it didn't work, But he appeared to me now to select the limits.


2 years ago

Please do not set limits while we are trying to debug this, that can cause your service to crash.

Share your repo please, you have something configured incorrectly at the project level.


kevinkeyssx
OP

2 years ago

This is my repository, anyway my project was already working, but it stopped working overnight, without having sent any commit

https://github.com/KevinKeyssx/Profile-back


2 years ago

This is a fast API app, thus you need to run the app with uvicorn.


kevinkeyssx
OP

2 years ago

Obviously it works with uvicorn, and it is installed with requirements.txt, but it still doesn't work, in fact I just updated the dependencies and everything, in fact I have other apps deployed with fastapi and they are working

annotated-types==0.7.0
anyio==4.4.0
click==8.1.7
colorama==0.4.6
fastapi==0.112.0
greenlet==3.0.3
h11==0.14.0
idna==3.7
psycopg2==2.9.9
pydantic==2.8.2
pydantic_core==2.20.1
python-dotenv==1.0.1
sniffio==1.3.1
SQLAlchemy==2.0.32
sqlalchemy-json==0.7.0
starlette==0.37.2
typing_extensions==4.12.2
uvicorn==0.30.5

2 years ago

You need to start the app with uvicorn.

You are currently just running main.py


kevinkeyssx
OP

2 years ago

Ok, thank you very much for your support


Welcome!

Sign in to your Railway account to join the conversation.

Loading...