Discord bot went offline randomly in US East region
r0b3rtb03
HOBBYOP

2 months ago

Discord bot went offline randomly in US East region

My Discord bot (discord.js v14) was running fine on Railway US East when I was testing it through out the week. But today (When I fully launched it to my server) it randomly just went offline.

Symptoms

  • Bot shows offline, client.login() hangs indefinitely (no resolve, no reject)
  • Discord REST API (https://discord.com/api/v10/gateway) returns HTML instead of JSON (Cloudflare challenge page)
  • Web server on the same process works fine (port 10000 responds normally)

Diagnostics

  • ✅ Token is valid (72 chars, freshly reset)
  • CLIENT_ID and GUILD_ID are correct
  • fetch('https://discord.com/api/v10/gateway')Unexpected token < (HTML response)
  • client.login() times out after 30s with no error
  • ⚠️ No code changes — last working deployment was 20 hours prior

Fix

Switching from US East → US West immediately resolved it. Bot connected within seconds.

Question

Are US East IPs currently flagged by Cloudflare/Discord? Is this a known recurring issue, or is there something Railway can do to prevent it (like rotating IPs or whitelisting with Cloudflare)?

Solved

5 Replies

2 months ago

We already use many different IPs per region, so if a service you connect to blocks the range, we unfortunately cannot do much about that.


r0b3rtb03
HOBBYOP

2 months ago

So I would just have to flip flop from US east and west everytime the bot's connection gets cut off?


2 months ago

Or use a tunnel in code that gives you your own IP.


r0b3rtb03
HOBBYOP

2 months ago

Wait you're right LMAOO, I can just make a cloudflare worker proxy that I use to bypass Steam's API block


2 months ago

No comment, haha.


Status changed to Solved brody about 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...