Memory leak using data-store package

javascript
#1

Project: glitch/tihon

My project keeps refreshing after a while due to no memory left. Using os module i’ve logged memory stats.

My idea why it consumes a lot of memory is that I’m using data-store package because, after I added it, the problem appeared. I store users’ data that updates on every message and adds 1 coin to user. The structure of this:

Set {
  412844794: { amount: 34 },
  ...
}

But there isn’t a lot of data! Why it is goes like that, I can’t understand.

#2

Actually, in logs there is something wrong because there is 512 MB of memory :confused:

#3

I’m not sure why this package is consuming so much memory, but maybe someone else might be able to shed some light.

Your memory calculations may be off because the os module may be confusing host memory with container memory. You might find Get Express Package CPU, RAM and Disk to display for my Discord Bot helpful.