You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.
Hashes will the be empty at first and will just pile up as the bot runs, and replace the existing hash when the hash is updated, but this doesn't account deletes, ex: guild delete, channel delete, etc. means those hashes from those deleted guild, channels, etc will remain in memory. Since there are no sweeper, or a lru cache that can remove the unused hashes after x amount of time, this existing hashes that is from a deleted guild or channel will pile up causing a memory leak, which can eventually crash a bot
The text was updated successfully, but these errors were encountered:
Please describe the problem you are having in as much detail as possible:
As I noticed in:
https://github.com/discordjs/discord.js-next/blob/6ebe80f1d3f72c6d66e515620c590d4cd6398a15/packages/rest/src/lib/RequestManager.ts#L119
and
https://github.com/discordjs/discord.js-next/blob/6ebe80f1d3f72c6d66e515620c590d4cd6398a15/packages/rest/src/lib/handlers/SequentialHandler.ts#L167
Hashes will the be empty at first and will just pile up as the bot runs, and replace the existing hash when the hash is updated, but this doesn't account deletes, ex: guild delete, channel delete, etc. means those hashes from those deleted guild, channels, etc will remain in memory. Since there are no sweeper, or a lru cache that can remove the unused hashes after x amount of time, this existing hashes that is from a deleted guild or channel will pile up causing a memory leak, which can eventually crash a bot
The text was updated successfully, but these errors were encountered: