undici connection errors

whats up my swag devs im back here with the same issue from 2 weeks ago because updating did not resolve it; we're having a recurring issue with our bot (in one server, not sharded) randomly hitting 100% CPU. when i manage to get into the server to check why, these are the only errors i see spawned from undici: - ConnectTimeoutError: Connect Timeout Error - SocketError: other side closed - Error: write EPIPE - RequestAbortedError [AbortError]: Request aborted and the occasional "unknown interaction", which i have no idea where its coming from thank u in advance
No description
7 Replies
d.js toolkit
d.js toolkit7mo 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!
georgicaaa
georgicaaa7mo ago
if you have a big project its hard to find what part of code its making cpu spikes its a question
jamie
jamieOP6mo ago
issue just reoccurred today, i haven't been able to trace anything causing an issue. these errors spawn out of nowhere as i just caught it this bot is in one server (100k+ members) and does a lot with threads, including sifting through them in our support once every minute to either ping our support team if no one has answered for 10+ minutes, or ping the member who opened it if they haven't responded in 20+ minutes - im kinda wondering if this might be it someone had suggested logging the performance times to see how long some intensive operations take, and that one seems to be the only one that gradually takes longer and longer gotcha :thumb:
jamie
jamieOP6mo ago
Pastebin
cleanThreads function - Pastebin.com
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.
jamie
jamieOP6mo ago
this is apart of an entire file called SupportThreadService, but this is the function itself for the cleaning threads part of the service
Benluka.dev
Benluka.dev6mo ago
is it fine btw to handle cases that might or might not occur so when i develop a bot feature, i try to make sure every edge case is handled (some cases have possibility of never occuring) is that a good thing oh gotcha
jamie
jamieOP6mo ago
sorry for the late reply, thank you so much!
Want results from more Discord servers?
Add your server