Keep your bot online: crashes, restarts and logs
A hosted bot should run for weeks without attention. When it doesn't, the cause is almost always in the console.
How restarts work
- If your bot's process exits unexpectedly, the panel tries to start it again automatically.
- If it crashes repeatedly within a short time, it's left offline so it doesn't restart in an endless loop. Check the console, fix the error, then click Start.
- Want a fresh start every day? Add a restart schedule.
Find out why it stopped
- Open the Console on panel.ngpcloud.in or your dashboard.
- Scroll up to the last lines printed before it stopped - the real error is usually the first red line, not the last.
Common causes
| Symptom | Likely cause | Fix |
|---|---|---|
| Stops after a few hours, no error | Out of memory - the process was killed at your plan's limit | Check memory graph; fix leaks (unbounded caches, growing arrays) or upgrade |
UnhandledPromiseRejection then exit (Node.js) | An await threw with no try/catch | Add error handling (below) |
429 Too Many Requests | Hitting Discord rate limits | Slow down bulk actions; don't loop API calls |
| Works locally, crashes on start here | Missing dependency or wrong runtime version | Check package.json / requirements.txt, Docker image version |
Catch errors instead of crashing (Node.js)
process.on('unhandledRejection', (reason) => {
console.error('Unhandled rejection:', reason);
});
client.on('error', (err) => console.error('Client error:', err));
For Python, wrap risky command handlers in try/except and use the logging module so errors land in the console.
Keep logs you can read later
The console only shows recent output. For longer history, write logs to a file (for example logs/bot.log) and download it with the file manager. On Discord, /logs returns your server's recent console output.
Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.