#High Ram and CPU utilization (Fixed)

26 messages · Page 1 of 1 (latest)

opal hearth
#

I uptime 4 bots and while 3 of them use ram at normal levels, one of them can output at least 50MB and up to 2GB of ram usage, very separate from them. I can't figure out why this is happening. Does anyone have any thoughts or suggestions? Bot on 2 servers (One of the servers is a server i use as a backup)

mint valveBOT
#
  • 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
opal hearth
#

5 minutes after i turned on the bots, this is how the data is now;

loud sierra
#

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

paper rune
#

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

opal hearth
opal hearth
#

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

paper rune
#

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

quartz crag
#

trace heap memoru for leaks

opal hearth
#

(Fixed)

#

High Ram and CPU utilization (Fixed)

opal hearth
#

I figured out where it was and fixed it

paper rune
#

congrats

opal hearth
#

It currently uses between 30-50MB

paper rune
#

out of curiosity, what was it?

opal hearth
#

I didn't define time for setInvertal and that's why the problem occurred

paper rune
#

so it would just set a bunch of them?

paper rune
#

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