Endpoints are not answering and I've got no deploy errores
404mqs
HOBBYOP

a month ago

Title ^

Solved

1 Replies

404mqs
HOBBYOP

a month ago

The backend of my application is deployed here on Railway


404mqs
HOBBYOP

a month ago

Apparently it just stopped working. I checked the console but there are no errors


404mqs
HOBBYOP

a month ago

1434686606069207000


passos
MODERATOR

a month ago

hey, can you maybe do a redeploy?


404mqs
HOBBYOP

a month ago

I already did that… but let me try again


passos
MODERATOR

a month ago

maybe your code got into a weird state and isn't responding to HTTP requests


404mqs
HOBBYOP

a month ago

It's weird because it just randomly stopped. My last commit was 20hs ago


404mqs
HOBBYOP

a month ago

Redeployed.. still the same


passos
MODERATOR

a month ago

can you go to your http logs and send a screenshot of a failed request?


passos
MODERATOR

a month ago

looks like the request is timing out, can you expand one of those requests please?


404mqs
HOBBYOP

a month ago

Maybe a PORT problem???


passos
MODERATOR

a month ago

oh i'm seeing connection refused errors


passos
MODERATOR

a month ago

are you able to follow the docs for common errors first? https://docs.railway.com/reference/errors/application-failed-to-respond


passos
MODERATOR

a month ago

Might seem counterintuitive since the application was working earlier, but the logs actually justify it.


404mqs
HOBBYOP

a month ago

@ThallesComH


404mqs
HOBBYOP

a month ago

I fixed it! Just wanted to give you an update and say thanks for your help troubleshooting the 502 error.

I figured out the` root cause: it wasn't actually a port configuration issue. The backend was listening on port 8080 correctly, but the server startup was getting blocked by the Twitter Bot initialization. Specifically, the bot was calling Twitter's API during startup with waitonratelimit=True, which caused Tweepy to sleep for 6+ minutes when it hit rate limits. This meant the FastAPI server never completed its startup sequence (never reached "Application startup complete"), so Railway kept refusing all connections with "connection refused" errors. The fix was straightforward: Changed waitonratelimit=False to prevent blocking behavior
Removed the get_me() authentication check during initialization (now it validates lazily on first tweet)
Added explicit error handling for TooManyRequests exceptions during tweet posting
Now the server starts in under 5 seconds and handles rate limits gracefully without blocking. The bot still works perfectly, it just doesn't freeze the entire application when Twitter's API tells it to slow down. Really appreciate your help pointing me in the right direction with the Railway logs and networking config!


bombshellmx
PRO

a month ago

I've some endpoints that arent working either


passos
MODERATOR

a month ago

Oh that explains everything then, I'll be closing this thread, if you've any more issues feel free to create another one.


passos
MODERATOR

a month ago

Hey, please open your own help thread so we can help you


passos
MODERATOR

a month ago

!s


Status changed to Solved passos about 1 month ago


Status changed to Solved passos about 1 month ago


Loading...