Ratelimiting from US west
decodings
PROOP

a month ago

Project ID: 5ca4d9f1-d488-4969-8a68-89e96847e80b

Environment: production

Issue: Persistent rate limiting when accessing Discord, appearing to originate from Railway's platform/IP rather than your application

Solved$20 Bounty

3 Replies

Railway
BOT

a month ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway about 1 month ago


a month ago

Hey, how often are these requests going to Discord? Discord returns a X-RateLimit-Reset header.


medim

Hey, how often are these requests going to Discord? Discord returns a `X-RateLimit-Reset` header.

decodings
PROOP

a month ago

Thanks for taking a look. I don't think it's a normal Discord rate limit though there's no X-RateLimit-Reset header on these responses. It's a Cloudflare 1015 ("you are being rate limited"), served as an HTML page, so it's getting blocked at Cloudflare's edge before it ever reaches Discord's API. That's an IP-level block, not a per-route limit.

And it's basically not a request-volume thing on my end. The bot does a single GET /users/@me login call when the process starts and that's it. With backoff it's only trying about once every 15 min right now. Even a totally fresh container gets the 1015 on its very first login attempt, instantly, so it's not like I'm hammering anything.

I also removed the deployment completely for over 6 hours (zero outbound traffic) and then redeployed once, and the first login still came back 1015. If it were a temporary per-account thing it would've cleared by now. It hasn't, which makes me think the shared US West egress IP is the one that's blocked, probably from other tenants' traffic.

Project ID 5ca4d9f1-d488-4969-8a68-89e96847e80b, production env, US West region.

Is there a way to get a different egress IP, or should I just move the service and its volume to another region to get off the blocked one?


decodings
PROOP

a month ago

Fixed it. changed the regions!


Status changed to Solved medim about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...