---
title: "My bot keeps going offline"
url: https://help.endercloud.in/docs/bot-keeps-going-offline
category: "Bot Hosting"
type: Troubleshooting
tags: ["bots", "crash", "discord", "troubleshooting"]
keywords: "bot offline, bot stops working, bot crashed, bot restarting, crash loop, unhandled promise rejection, out of memory, killed, 429 too many requests, rate limited, token invalid, disallowed intents, bot suspended, discord bot not online 24/7, bot going offline, why is my bot offline, bot not responding, bot crashing, bot stopped, discord bot offline, bot auto restart, used disallowed intents, bot not online, bot band ho gaya, bot off ho jata hai"
difficulty: beginner
time: "10 minutes"
updated: 2026-11-14
source: Endercloud Knowledge Base (official)
---

# 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.

When a bot on Endercloud goes offline, the reason is almost always in the **Console**. Open your bot in the [Game Panel](https://panel.endercloud.in), 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](https://billing.endercloud.in) 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](/docs/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?](/docs/which-discord-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](/docs/keep-your-bot-token-safe-with-environment-variables).
    
-   **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](/docs/how-to-schedule-automatic-restarts-and-backups). 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

**Q: 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.

**Q: Is Endercloud's server down?**

Check [uptime.endercloud.in](https://uptime.endercloud.in). If everything there is up, the problem is almost always in the bot's code or settings.

**Q: 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](https://billing.endercloud.in/tickets/create) and paste the last 20 lines of your console.
