Skip to content
EndercloudKnowledge Base
TroubleshootingBot Hosting

My bot keeps going offline

Most bots go offline because the code crashes, runs out of memory, uses an invalid token or missing intents, hits Discord rate limits, or the service is suspended for an unpaid invoice.

Updated 4 min read
Difficulty:
Beginner
Time:
10 minutes
On this page

When a bot on Endercloud goes offline, the reason is almost always in the Console. Open your bot in the Game Panel, look at the status in the header, and read the last lines before it stopped.

Why it happens

  • The code crashed because of an error that isn't handled.

  • It ran out of memory and the process was stopped.

  • Discord refused the login because of an invalid token or disallowed intents.

  • Discord rate-limited the bot after too many requests.

  • The service is suspended because its renewal invoice wasn't paid.

How to fix it

1. Check that the service is active

If the panel shows the server as suspended, or you can't start it at all, log in to the billing panel and check Invoices. Services are suspended 1 day after the due date if unpaid. Pay the invoice and start the bot again. See How billing, renewals, suspension and deletion work.

2. Fix crashes and crash loops

If the console shows an error and a stack trace just before the bot stopped, that error is the cause. A bot that starts, crashes, and starts again over and over is in a crash loop; the first error after each start is the one to fix.

  • Node.js: errors like Unhandled promise rejection or DiscordAPIError stop the process. Wrap risky code in try { … } catch (err) { … }, add .catch() to promises, and listen for errors on your client, for example client.on('error', console.error).

  • Python: catch exceptions in commands and add an error handler, for example on_command_error in discord.py.

  • Missing permissions (Missing Permissions, error 50013) are a common crash. Check the bot's role in your Discord server.

  • Node.js bots deployed from GitHub: if Auto Update is 1 in Startup, every restart pulls your latest commit. A broken commit then crashes the bot each time it starts. Fix the code and push again, or set Auto Update to 0 while you sort it out.

3. Check memory use

Watch the RAM figure in the panel header. Smaller plans have little memory (Lite has 360 MB), so this is a common cause. If it climbs to your plan's limit and the bot stops with words like Killed or out of memory, the bot needs less memory or a bigger plan.

  • Look for memory leaks: lists, caches or maps that grow forever.

  • In discord.js, limit caches you don't need. In discord.py, only enable the intents you use.

  • If the bot simply needs more, open the service in the billing panel and click Upgrade Plan; you pay only the difference. See Which bot hosting plan should I choose?

4. Token and intent errors

  • Invalid token (for example "An invalid token was provided" or LoginFailure): the token was reset or copied wrongly. Get a new one from the Developer Portal and update your .env. See Keep your bot token safe.

  • Disallowed intents ("Used disallowed intents" or PrivilegedIntentsRequired): turn on the intents your code asks for (Message Content, Server Members or Presence) under Bot → Privileged Gateway Intents in the Developer Portal. Bots in 100 or more servers need Discord's approval for these.

5. Rate limits (429 Too Many Requests)

Discord limits how fast a bot can make requests. If your code loops sending messages, editing roles or retrying failed requests, Discord answers with 429 and the bot appears stuck. If your bot makes too many failed requests (Discord's documented limit is 10,000 invalid requests in 10 minutes), Discord blocks the connection for a while.

  • Don't send messages or call the API in fast loops.

  • Fix commands that fail again and again, such as missing permissions.

  • Use your library's built-in rate limit handling instead of retrying yourself.

6. Make it come back after a crash

Fix the cause first: a bot that keeps crashing will keep going offline. As a safety net, a schedule in Schedules with a power action can start or restart the bot on a timer. See How to schedule automatic restarts. If you'd like your bot to restart automatically after a crash and aren't sure it is set up that way, open a ticket and our team will check.

Frequently asked questions

The console is empty. How do I see what happened?

Start the bot and keep the console open until it stops. Many bots also write log files you can open in Files. Add log lines to your code so you know which step it reached.

Is Endercloud's server down?

Check uptime.endercloud.in. If everything there is up, the problem is almost always in the bot's code or settings.

Can Endercloud fix my bot's code?

We help with the hosting side: starting, files, memory and the panel. We can't write or debug your bot's code, but we're happy to help you read the console error.

Still stuck? Open a ticket and paste the last 20 lines of your console.

Host your botInstant setup · 24/7 support · DDoS protection

Was this article helpful?

Related articles

Join Our Discord

Connect with our community of gamers and developers

Get instant support, share experiences, and stay updated with the latest news

Join Discord