A 429 means Discord wants your bot to slow down, and error 1015 means Cloudflare has blocked the IP address your requests come from. On a shared host that address often belongs to many bots at once, so one badly behaved bot can get all of them blocked.

What the two errors mean

429 Too Many Requests comes from Discord's API. Every route has its own limit, and there is a global limit per bot on top. The answer carries a retry_after value. discord.js, discord.py, Pycord and DiscordGo read it and wait on their own, so an occasional 429 in your console is normal.

Error 1015 comes from Cloudflare, which sits in front of Discord. Discord counts invalid requests per IP address: answers with status 401 (bad token), 403 (missing permission) and 429. An address that collects too many of them in ten minutes is blocked for a while. The block covers the whole address: every bot behind that address gets the 1015 page instead of an answer until the block runs out.

Why shared hosts are hit hardest

Most cheap hosts send all their customers' traffic out of the server's own address. Two hundred bots on one machine look like one client to Cloudflare. Your bot can be perfectly well behaved and still be blocked because of a neighbour you have never heard of.

The usual neighbour is a bot with a revoked or mistyped token that restarts in a loop. Each start tries to log in, gets a 401 and exits. A restart loop like that produces hundreds of invalid requests an hour, and the whole address pays for it.

What to fix in your own code

  • Stop on a bad token. If login fails with an authentication error, exit and stay down. Don't retry it in a loop.
  • Let the library handle 429. Don't wrap API calls in your own retry loop that ignores retry_after.
  • Read from the cache and from gateway events. Fetching members, messages or channels over REST on a timer burns through limits that events would give you for free.
  • Check permissions before you call. Sending to a channel the bot can't write in is a 403, and 403s count as invalid requests.
  • Reuse connections. Posting to a webhook with a new connection each time looks like a burst of short connections from your bot.

How HostDC handles it

We can't change Discord's limits. We keep one bot from using up an address that other bots rely on, and we never hide a misbehaving bot by moving it to a fresh address.

  • Bots go out through proxies. Our servers send bot traffic through proxy addresses, kept in separate pools for Free, Lite and Pro bots (Mini uses Lite's, Max uses Pro's). Each pool address is sized for about 75 bots. A bot keeps the same address while that proxy works. If a server has no proxies set up yet, its bots use the server's own address until it does.
  • A brake per bot. Each bot may open only a limited number of new connections to Discord a minute. A bot that keeps opening short connections that end at once, the shape of a rejected token, is slowed down first. If it keeps going it is flagged for review, and a bot that floods its proxy is stopped. You see a line about it in the bot's console.
  • An eye on each server. When the failed connections from one server pass a budget, we get an alert and the bots causing most of them are slowed down.
  • Your own address, if you want it. The dedicated proxy add-on gives your account a proxy that only your bots use, on every server. Nobody else's mistakes count against it. It is on the pricing page while we have one in stock. You can also point a bot at a proxy you already rent on its Proxy tab; it runs behind our own exit, so your provider never sees the server's address.

These checks lower the risk of a block on a shared address; they don't rule it out. Our proxies don't decrypt your traffic, so they see how many connections a bot opens and how long they last, not the status codes inside.