#High Ram and CPU utilization (Fixed)
26 messages · Page 1 of 1 (latest)
- 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 staff
5 minutes after i turned on the bots, this is how the data is now;
There's a lot of factors that this can depend on
What is the nature of this bot, how many servers does it have, do you utilise any cache customisation, do you only use necessary intents
Just some of many
My question would be how you even manage that your other bots use that little resources,.. my bots typically use around 80 - 120mb of ram.
If the memory usage increases with runtime... Memory leak?
Did you try debugging with chrome Dev tools?
You can look at memory or CPU profiles there
The bot is on 2 servers, only members and servers are cached, the purpose of the bot is the level system
In general all my bots run between 30-60MB, the Node.JS representation of the 2 bots you see in the SS does not depend on CMD
I haven't tried Dev Tools.
The number of servers and users of your bot is an incentive to increase the cache usage of your bot
Yea but if it's on a limited number of servers that wouldn't grow endlessly, and 2gb seems a bit much for 2 servers lol
Thought idk how stuff behaves on like really large servers
Idk how u do 30-60, while the heap is usually around 20mb for me the overall memory usage is like 100mb
trace heap memoru for leaks
(Fixed)
High Ram and CPU utilization (Fixed)
That's because there's a memory leak.
I figured out where it was and fixed it
congrats
It currently uses between 30-50MB
out of curiosity, what was it?
setInvertal problem
I didn't define time for setInvertal and that's why the problem occurred
so it would just set a bunch of them?
mhh, still don't quiet get how u get that low of a memory consumption, but I'm not quiet sure what windows lists as memory used, it shows 30mb, while pm2 shows 72mib total and 25mib heap size