Karew
DIAdiscord.js - Imagine an app
•Created by Karew on 1/12/2024 in #djs-questions
Cache/sweeper settings for memory constraints, mostly messages
We are in a very memory constrained environment. Our individual bot processes can't exceed 512 MB. Right now each process is managing 3 shards of our Discord connection.
1. The bot only listens for new messages and new threads to join.
2. It only determines if it needs to reply to a message, and we also log some info about the guild to an external service
3. We don't care about reactions, members, message edits, any other part of the message lifecycle, and we don't need to retain any messages longer than it takes to process them.
I'm trying to configure the
makeCache
and sweepers
settings to help optimize memory usage in this scenario. What I have is below, any other suggestions would be welcome
8 replies