#bot going casually offline
73 messages · Page 1 of 1 (latest)
• 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.
version is [email protected]
now ill send debug logs for when the bot crashes (kinda hard to get the exact moment because it happens casually). read #djs-help-v14 message for more
here is one (the ready log is from the ready event that occurred after i manually restarted the bot)
and here is another one (didnt restart the bot yet here, its still offline)
The logs are not clear at all
after i restarted
The logs are not clear
how can i make them more clear
ill try to send the whole pm2 logs file
sorry if it took time but i had to trim a 76mb file of pm2 logs to just what i needed 😅
anyways here are 4k lines of the debug logs
Please send your query in #djs-help-v14
I don't think I know enough to solve your problem
alr thanks anyways
just to catch you up
this issue has been ongoing for a while now and has had two separate prs that have each fixed the issue for some but not others
qjuh mentioned the author of the second pr in #djs-help-v14, but it seems they haven't responded yet
#8486 in discordjs/discord.js by NeonWizard closed <t:1672595361:R>
Bot randomly exiting process or going offline/unresponsive
so it isnt fixed yet? is there any patch available?
the crashes are happening like once a hour its becoming impossible to be there and always restart
it was supposed to have been fixed twice, and the suggestion to use the dev build was to test those two fixes for your case
with this we'll need to investigate further
alright. what i find really weird is that two days ago the bot was fine (on stable 14.7.0) then yesterday it started out of nowhere to crash and the dev just didnt change anything
happened to be there when they responded so here's their reply
#djs-help-v14 message
@torpid burrow Hey, try setting the presence after 30s of the ready event using timeout.
also provide me with more logs and the ready event code
@soft moon hey since you are actively helping people, Can you please tell me how common is this issue happening and the frequency of it?
The last log @torpid burrow sent has no crash so I am a bit confused here
it hasn't been happening as frequently since the two prs got merged
for frequency, I personally have only seen one or two since then
hmm, from what I can see
It can be an issue because of network issue or slow vps if the process is not crashing
if the process is still crashing for them then its a library issue
as I said last log shows no sign or process exit or crash but rather shows a fine reconnect
The process did crash, the last few lines are from pm2 restarting
hi. uhm, yesterday i tried to convert the bot to another library to see if it was a djs problem and it crashed anyways (Error: connection reset by peer) so i think it might be a problem with my vps
Good to hear for us, not good for you obviously
it didn't, we restarted it (im another dev of the bot btw, nice to meet you)
slow vps= bad connection?
speedtest is off sometimes
sudo apt install iperf3
iperf3 -c iperf.par2.as49434.net -fm -p9204 -O2 -P5 -4
try this
and show the network response also show the config
what is that
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
looks good
send me latest logs where in the process crashes and ready event code(if you are updating presence in that event)
the logs you mentioned me on didnt have that so i was confused
but right now we're not using djs since clauz rewrote it to check if djs was the issue, should i also send that one? (it's the same except it uses eris methods ofc) and the process doesn't crash, i think the ws connection just dies because the bot silently goes offline
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Yeah. I was wrong apparently, was a forced restart…
now it crashed, this has to be a vps/discord issue
i will prob contact discord support soon if i don't find a fix
can be "your" issue or vps issue
its not a discord issue. If it was then it would have been common
i dont think it's a vps issue since i tested on 3 different machines (my pc, a hetzner dedicated server and the oracle cloud vps i use for main hosting) with two different libs (discord.js and eris), the hetzner server lasted a little bit longer but the bot went offline again
so its your code
yeah i was thinking abt that
we have never experienced that issue in our bot, we have 80+ shards and is one of the most active game bots out there
the only problem is that it's difficult to test because i really can't replicate the 550 guilds without testing in production :/
you were right, i went a few commits back and it's running just fine
i will prob leave it overnight to check if it fixed
yeah.. it looks like a commit @torpid burrow pushed made the entire bot crash without logs, we still don't know what caused this crash but i'm pretty sure it's related to the db, well it's been a long journey, thanks to everyone for helping us
👍
looks like i fixed it for real now, there was a while loop that managed to break the event loop if ran for too long