Gui
Gui
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
check your dm please
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
60 shards in 6 clusters, 10 shards per clusters
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
I believe that DiscordJs is terrible at using RAM, due to its high cache dependency. Even with the limits that we can change (cacheWithLimits), we still have a lot of problems. Today I have 80k guilds and bot is using 12gb of ram, I believe you have a cool result, considering that we are on discord js.
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Basically, you have two tools at your side: - Limit cache of your bot (like this https://discord.com/channels/222078108977594368/1091587729894154260/1093318511289434113) - discord-hybrid-sharding (https://www.npmjs.com/package/discord-hybrid-sharding) Check hybrid-sharding, it saved me 4gb of memory. Play with the maximum number of clusters and shards, this also influences 😉
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Your theory and idea sounds good, I'll do a better test on a server with more ram.
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
i tryed heapdump, but it seems obsolete and not work
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Do you recommend any specific tools to help me with this? there doesn't seem to be anything wrong with the code
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
I'm scared to get double in discord.js (50k with idle bot (no players uses), aprox 7gb and goes up quickly)
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
I may be confusing things in discord.py, I'm migrating from there due to the end of discord.py In d.py with 50k servers and with heavy usage I get 4.4gb of ram
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
If anyone has any ideas beyond the cache, it would be most welcome.
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
I wonder if I'm putting the configuration in the right place, this is the file that creates the client
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
New cache policy:
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
allowedMentions: { parse: ['users', 'roles'] },
messageEditHistoryMaxSize: 0,
messageCacheMaxSize: 0,
messageCacheLifetime: 21600,
messageSweepInterval: 21600,
makeCache: Options.cacheWithLimits({
ReactionManager: 25,
UserManager: 25,
GuildMemberManager: 25,
MessageManager: 25,
MessageContent: 25,
GuildEmojiManager: 25,
ThreadManager: 0,
PresenceManager: 0,
VoiceStateManager: 0,
AutoModerationRuleManager: 0,
BaseGuildEmojiManager: 0,
GuildBanManager: 0,
GuildInviteManager: 0,
GuildTextThreadManager: 0,
ReactionUserManager: 0
}),
});
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
allowedMentions: { parse: ['users', 'roles'] },
messageEditHistoryMaxSize: 0,
messageCacheMaxSize: 0,
messageCacheLifetime: 21600,
messageSweepInterval: 21600,
makeCache: Options.cacheWithLimits({
ReactionManager: 25,
UserManager: 25,
GuildMemberManager: 25,
MessageManager: 25,
MessageContent: 25,
GuildEmojiManager: 25,
ThreadManager: 0,
PresenceManager: 0,
VoiceStateManager: 0,
AutoModerationRuleManager: 0,
BaseGuildEmojiManager: 0,
GuildBanManager: 0,
GuildInviteManager: 0,
GuildTextThreadManager: 0,
ReactionUserManager: 0
}),
});
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Seems to have no effect, to be honest
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Today I tried to apply a heavier cache and I didn't get good results
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
I had some free time to development the bot again, I didn't get a solution
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Changed all 250 to 50 and get same result Tomorrow will try make memory profiling
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
I limited several managners and still got a bad result (7.5g), any idea why?
const client = new Client({
makeCache: Options.cacheWithLimits({
ReactionManager: 250,
UserManager: 250,
GuildMemberManager: 250,
MessageManager: 250,
MessageContent: 250,
GuildEmojiManager: 250,
ThreadManager: 0,
PresenceManager: 0,
VoiceStateManager: 0,
AutoModerationRuleManager: 0,
BaseGuildEmojiManager: 0,
GuildBanManager: 0,
GuildInviteManager: 0,
GuildTextThreadManager: 0,
ReactionUserManager: 0
}),
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
allowedMentions: { parse: ['users', 'roles'] }
});
const client = new Client({
makeCache: Options.cacheWithLimits({
ReactionManager: 250,
UserManager: 250,
GuildMemberManager: 250,
MessageManager: 250,
MessageContent: 250,
GuildEmojiManager: 250,
ThreadManager: 0,
PresenceManager: 0,
VoiceStateManager: 0,
AutoModerationRuleManager: 0,
BaseGuildEmojiManager: 0,
GuildBanManager: 0,
GuildInviteManager: 0,
GuildTextThreadManager: 0,
ReactionUserManager: 0
}),
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
allowedMentions: { parse: ['users', 'roles'] }
});
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
What is making each shard to use 500mb, where can see that?
48 replies
DIAdiscord.js - Imagine an app
Created by Gui on 4/1/2023 in #djs-questions
D.js bot using 8gb ram
Can you tell me what exactly I should limit? Messages, guilds?
48 replies