memory

my bot is across 10,000 guilds with 10 shards, each shard is approximal needs 550-750mb I am using the following intents:
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildWebhooks,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
],
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildWebhooks,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
],
and those are the sweepers:
sweepers: {
...Options.DefaultSweeperSettings,
messages: {
interval: 3600,
lifetime: 3600,
},
users: {
interval: 23200,
filter: () => user => user.id !== client.user.id
},
presences:{
interval: 1800,
filter: () => presence => presence.user.id !== client.user.id
}
}
sweepers: {
...Options.DefaultSweeperSettings,
messages: {
interval: 3600,
lifetime: 3600,
},
users: {
interval: 23200,
filter: () => user => user.id !== client.user.id
},
presences:{
interval: 1800,
filter: () => presence => presence.user.id !== client.user.id
}
}
please ignore the presences filter I just wanted to completely clear it because it was consuming so much memory . any idea of how to monitor the bottle neck or what causes this consumption? (just for instances I am not using big dicts or anything like that mostly there is calls to db and there is nothing cached aprat djs cache) using default library's :
"axios": "^1.4.0",
"discord.js": "14.16.1",
"dotenv": "16.1.3",
"mongoose": "7.2.2",
"winston": "3.9.0"
"axios": "^1.4.0",
"discord.js": "14.16.1",
"dotenv": "16.1.3",
"mongoose": "7.2.2",
"winston": "3.9.0"
5 Replies
d.js toolkit
d.js toolkit2mo 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!
Shahar
ShaharOP2mo ago
No description
Shahar
ShaharOP2mo ago
is there anything I can do to reduce it?
erick
erick2mo ago
or you got some memory leaks with mongoose, i had that too
Shahar
ShaharOP2mo ago
What is the normal usage of memory for a simple bot (like per shard) Average?
Want results from more Discord servers?
Add your server