Discord bot login blocked: Shared egress IP rate limited by Cloudflare (Error 1015)
mrlalsa
FREEOP

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.

Solved$10 Bounty

5 Replies

Railway
BOT

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


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.

https://docs.discord.com/developers/topics/rate-limits


romonaga
PRO

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

mrlalsa
FREEOP

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.


romonaga
PRO

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.

If you attached an authorization header, rate limits will be applied to the bot instead of the IP.

https://docs.discord.com/developers/topics/rate-limits


Status changed to Awaiting User Response Railway 18 days ago


Railway
BOT

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...