#Troubleshoot Memory Issues

9 messages · Page 1 of 1 (latest)

teal elbow
#

I have one app that is regularly getting killed by the system for memory consumption. Any tips on how to begin troubleshooting what is causing this would be appreciated.

dry brambleBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
delicate fox
#

what intents are you using

teal elbow
zenith igloo
#

how many guilds is the bot in/how much memory does it use/exceed on crash?

teal elbow
# zenith igloo how many guilds is the bot in/how much memory does it use/exceed on crash?

1 guild,

`
[11114676.411569] Out of memory: Killed process 651420 (bun) total-vm:74235776kB, anon-rss:162544kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:688kB
oom_score_adj:0
[9987737.521653] Out of memory: Killed process 528010 (bun) total-vm:74391420kB, anon-rss:190984kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:724kB
oom_score_adj:0
[198711.105407] Out of memory: Killed process 11122 (xo) total-vm:12562500kB, anon-rss:369976kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:9544kB oom_score_adj:0

zenith igloo
#

How many members has that guild?

teal elbow
#

684

zenith igloo
#

Then it’s not the intents or data you receive from djs that causes those memory spikes… use chrome devtools and connect them to NodeJS to get a heap dump showing what‘s actually consuming that much memory