18 days ago
Hi, my Discord bot deployed on Railway has been getting 429 Too Many Requests from Discord's API for the past 12+ hours during login. The Cloudflare error page shows Error 1015 — the shared egress IP appears to be temporarily banned by Discord/Cloudflare. Can you help me to fix this issue plz.
5 Replies
18 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 18 days ago
18 days ago
Unfortunately, Railway isn’t able to do anything about Discord or Cloudflare’s bans. You might want to review the amount requests you’re making, as well as making sure you’ve attached an authorization header to each request to avoid being blocked by IP.
18 days ago
Your app needs request throttling. Right now it is sending too many requests too quickly, and that needs to be slowed down.
Discord publishes rate-limit guidance, so the app should be respecting those limits. On the Cloudflare side, Railway is clearly using Cloudflare, and it would really help if Railway provided better visibility into what limits are being hit and how developers are expected to handle them.
If yoiu let me know what language you are targeting I might have some code you can use
romonaga
Your app needs request throttling. Right now it is sending too many requests too quickly, and that needs to be slowed down. Discord publishes rate-limit guidance, so the app should be respecting those limits. On the Cloudflare side, Railway is clearly using Cloudflare, and it would really help if Railway provided better visibility into what limits are being hit and how developers are expected to handle them. If yoiu let me know what language you are targeting I might have some code you can use
18 days ago
Thanks for your response.
I'm using Python for my bot.
I've been researching this issue, and from what I've found, Railway uses shared infrastructure. Because of that, it's possible that another application's traffic on the same shared IP triggered Cloudflare's rate limits, causing my bot to be affected as well.
I've analyzed my bot multiple times and thoroughly reviewed the code. I haven't found any bugs or request loops that would cause excessive API requests. From everything I've checked, my bot appears to be respecting Discord's rate limits.
At this point, could you please let me know how I can resolve this issue? If there's anything specific I should change or any additional debugging steps you recommend, I'd really appreciate your guidance.
18 days ago
I can not speak of what cloudflare does, however, I suspect if you make sure you are rate limiting your app you will get past the issue. I have a block of code you could examien and see if you can use in your applicaiton, however I have no way to put it here.
mrlalsa
Thanks for your response. I'm using Python for my bot. I've been researching this issue, and from what I've found, Railway uses shared infrastructure. Because of that, it's possible that another application's traffic on the same shared IP triggered Cloudflare's rate limits, causing my bot to be affected as well. I've analyzed my bot multiple times and thoroughly reviewed the code. I haven't found any bugs or request loops that would cause excessive API requests. From everything I've checked, my bot appears to be respecting Discord's rate limits. At this point, could you please let me know how I can resolve this issue? If there's anything specific I should change or any additional debugging steps you recommend, I'd really appreciate your guidance.
18 days ago
If you attached an authorization header, rate limits will be applied to the bot instead of the IP.
Status changed to Awaiting User Response Railway • 18 days ago
11 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 11 days ago