The problem with shards

The bot was launched two days ago, it was on the host, it worked 24/7, in a single instance, but yesterday something happened and the bot suddenly died, and when it started, there were errors, although there were no incomplete sessions, etc. Other bots don't have such problems. I use the bot to synchronize users in the tg channel and the discord server.
Error: Not enough sessions remaining to spawn 1 shards; only 0 remaining; resets at 2025-02-23T21:04:34.120Z
at WebSocketManager.connect (C:\Users\ivale\Desktop\helper.oyumly\node_modules\@discordjs\ws\dist\index.js:1458:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async WebSocketManager.connect (C:\Users\ivale\Desktop\helper.oyumly\node_modules\discord.js\src\client\websocket\WebSocketManager.js:200:5)
at async Client.login (C:\Users\ivale\Desktop\helper.oyumly\node_modules\discord.js\src\client\Client.js:228:7)
Error: Not enough sessions remaining to spawn 1 shards; only 0 remaining; resets at 2025-02-23T21:04:34.120Z
at WebSocketManager.connect (C:\Users\ivale\Desktop\helper.oyumly\node_modules\@discordjs\ws\dist\index.js:1458:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async WebSocketManager.connect (C:\Users\ivale\Desktop\helper.oyumly\node_modules\discord.js\src\client\websocket\WebSocketManager.js:200:5)
at async Client.login (C:\Users\ivale\Desktop\helper.oyumly\node_modules\discord.js\src\client\Client.js:228:7)
3 Replies
d.js toolkit
d.js toolkit4d ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
oyumly
oyumlyOP4d ago
"dependencies": {
"discord.js": "^14.18.0",
"dotenv": "^16.4.7",
"node-telegram-bot-api": "^0.66.0"
}
"dependencies": {
"discord.js": "^14.18.0",
"dotenv": "^16.4.7",
"node-telegram-bot-api": "^0.66.0"
}
v20.12.1 - node version Yes, the bot was launched using pm2. When I logged into the VM, it showed 617 restarts. The fact is that there are no other problems, the bot is working correctly (tested on another one), without errors in the console, I don't understand what could have happened Will this limitation error go away over time?
slurpy_films
slurpy_films20h ago
You can always reset token and it will work right away It worked for me I might be wrong It didn't end at that point atleast

Did you find this page helpful?