aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
815 stars 171 forks source link

Cache system / ram usage #1221

Open zrSadek opened 3 months ago

zrSadek commented 3 months ago

Which package has the bugs?

The core library

Issue description

Hi, i think the sweepers etc dont work bcs i always have a big ram usage on simple code if i let them run for many hours, i tried many thing like makecache options, sweepers etc (the code below is not mine i found it on an other issue)

Code sample

const { Client, Options } = require("discord.js-selfbot-v13");
const client = new Client({
  disableEveryone: true,
  sweepers: {
    ...Options.DefaultSweeperSettings,
    messages: {
      interval: 3_600, // Every hour.
      lifetime: 1_800, // Remove messages older than 30 minutes.
    },
  },
});

Package version

latest

Node.js version

18*

Operating system

W11

Priority this issue should have

High (immediate attention needed if possible)

Checklist

Additional Information

none

aiko-chan-ai commented 3 months ago

The core is the discord.js library, I didn't change anything about the cache system

TheDevYellowy commented 3 months ago

How large is big ram usage, node itself takes a fair amount of ram, about 50Mb for just running not adding variables and such on top of that.

zrSadek commented 3 months ago

around +50mb per hour

zrSadek commented 3 months ago

i missclicked on the close btn

AdamMady commented 3 months ago

I have this same issue it really seem to use more and more ram by time and I have no idea what's causing it.

xvqm commented 2 months ago

there's multiple reason of why your ram increase:

xvqm commented 2 months ago

Options.DefaultSweeperSettings -> Options.defaultSweeperSettings

zrSadek commented 2 months ago

oui ca jlai juste repris d'une autre issue qui a ce soucis mais jai quand meme le soucis et jai mm pas de setinterval ou d'event userupdate jcomprends pas

xvqm commented 2 months ago

vient sur discord: sl.js

zrSadek commented 1 week ago

if i use pm2 monit i can see the heap usage growing up