1 Replies
Apparently it just stopped working. I checked the console but there are no errors
4 days ago
hey, can you maybe do a redeploy?
4 days ago
maybe your code got into a weird state and isn't responding to HTTP requests
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?
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.
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!
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
