Bot Shards Keep Reconnecting After Reboot
Has anybody else experienced a similar issue where their traditionally sharded bot gets stuck in a shard reconnect and bot restart loop after its first restarted? I've been having this issue for a while now and haven't been able to find the cause. I've gotten a mix of errors before this occurs such as IP discovery problems and
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
. Any recommendations? I feel like I've tried everything.14 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
• Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
• If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebinI've added that. Will update when additional logging info is provided.
@qjuh is this more helpful?
That's just a portion of the logs. It's difficult to sift through them and find exactly what causes the issue. I'll do my best though.
log the stuff to a file if that helps
Are these errors normal though? They occur right after I've recovered from the error and am restarting back up the bot 🤔
best thing to do rn is log that to a file and send the whole file here
I mean, there would be nothing more than what's in that screenshot.
It's just that error repeating across multiple shards.
Still trying to find the first cause which causes the spiral
There's a few of these sprinkled throughout but nothing out of the usual tmk
This is the first occurrence of Invalid Session. Prior to this, Shard 0 is heartbeating normally.
It's difficult to tell exactly. But this is the most recent occurrence of an issue that occurred on v14.11 whereas the previous one may have been on an earlier version of DJS.
After the first restart after the above error, after the following happens, it restarts again:
Occurs with the same shard it seems
And then after that, all the shards start having problems after it reconnects again
I do use pm2.
I've checked the error logs and I've not found anything out of the ordinary
Also, can you clarify what you mean be restarting the pm2 daemon? I usually just update my stuff, and then run a pm2 restart and everything works
And I don't think there are any errors when it completely restarts. But at the same time, it's also difficult to tell when it is completely restarting.
I do get this error sometimes since I use discord-hybrid-sharding:
But the people who support the package discord-hybrid-sharding have assured me time and time again that this is not an issue with their package and is instead an issue on my end.
I don't think that is the issue as this error was occuring in v14.9 as well
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I've already set it to -1