@DiscordJS/WS cache
By default, does djs/ws cache anything? for context I have GuildPresences, Guilds, and GuildMembers intents enabled.
19 Replies
- 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!
- ✅
Marked as resolved by OPI would assume not seeing as it's a barebones but I'm somehow running at like 20 GBs or more
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
20k guilds, last I checked was somewhere around 20 million users
im currently rewriting it from python lol, so the bot itself is very miniscule so im not sure why it's eating up so much ram unless there is stuff being cached by default
like.
all its doing is receiving presence update and pushing it to rabbitMQ thats it
unless somehow the data im pushing is staying within this instance?
for more context
nah, this is on you most likely
you're not acking the rmq messages or smth idk
by default messages stay in queues until consumed and acked, yes
also side note but the way you're handling delays could be better
use
buildIdentifyThrottler
and write a custom onethey are tho according to the UI.
what is that mem chart you showed
is it server wide usage
railway and no container
only
can't really tell then
there's an off chance /ws has some sort of memory leak but I doubt it
it does not cache anything
yeah that's what I figured
ima disable the event and see what happens
there's bots bigger than yours using it that run fine
yeee haha was ab to say i hope im not doing that lmao
i mean the UI shows them being consumed fast enough but is it possible that in real time they aren't actually? and that's causing the build up of mem?
i say that because the massive dips in memory
at one point in there it went from 8gb and jumped to 25
and it does that until it just hits mem limit
so I was logging as well to see if it matched up.
it's total used
between the 3
instances
okay, i disabled the broker/queue and it is indeed the issue.
I dont think there are enough consumers even tho the UI is reporting so