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

404mqs
HOBBY

4 days ago

Title ^

Solved

1 Replies

404mqs
HOBBY

4 days ago

The backend of my application is deployed here on Railway


404mqs
HOBBY

4 days ago

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


404mqs
HOBBY

4 days ago

1434686606069207000


4 days ago

hey, can you maybe do a redeploy?


404mqs
HOBBY

4 days ago

I already did that… but let me try again


4 days ago

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


404mqs
HOBBY

4 days ago

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


404mqs
HOBBY

4 days ago

Redeployed.. still the same


4 days ago

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


4 days ago

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


404mqs
HOBBY

4 days ago

Maybe a PORT problem???


4 days ago

oh i'm seeing connection refused errors


4 days ago

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


4 days ago

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


404mqs
HOBBY

4 days ago

@ThallesComH


404mqs
HOBBY

4 days 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
HOBBY

4 days ago

I've some endpoints that arent working either


4 days ago

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


4 days ago

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


4 days ago

!s


Status changed to Solved passos 4 days ago


Status changed to Solved passos 4 days ago


Loading...
Endpoints are not answering and I've got no deploy errores - Railway Help Station