Project Memory Leak

#1

Hello, I am now receiving this same error, I have tried all the solutions above and non of them seem to work,
project name: cmb

This has only started happening when I required a dependency in my project, which @cori suggested to me to see what is causing my high memory usage

(Also Cori, I have disabled the multiple logins you were talking about, and that had not helped one bit)

Hello how can I solve getting bindings files error
#2

@cori ^^ just incase you missed it

#4

Hey @Callum-OKane it looks to me like this has resolved itself due to a recent restart. Is that what you’re seeing?

#6

Whenever I use

var memwatch = require('memwatch-next');

I get this error

Error: Could not locate the bindings file. Tried:

#7

Hey @Callum-OKane it does indeed look like memwatch-next isn’t building properly. I’ll try to take a look when I have a few minutes; figuring that out is probably what’s required to get rid of that error.

#9

Ok! Hope you can find a working solution :slight_smile:

#10

Have you managed to find any solution yet @cori?

#11

Ok, it seems like node-memwatch is incompatible with Node v9+ based on some of the issues on the GitHub repo. If you set your Node version to "node": "8.15.0" I think node-gyp will be able to compile memwatch-next. You might need an enable-pnpm to make sure the install proceeds properly.

Since this was a different problem than the previous topic, I’ve moved it to a new topic.

#12

Ok, will this affect any functions on the rest of my project?

#13

I don’t know - are you using any v11.x-specific functions or packages?

#14

Apparently so.
I reverted the version, and got this error:

  return process.dlopen(module, path._makeLong(filename));
#15

I’m not quite sure what to make of that, @Callum-OKane. That doesn’t look like an error message; was there any additional information?

#16

Managed to get it working, this is watch Memwath-next tells me

{ online: true, guilds: 131, users: 20039 }

{ growth: 2905840,

  reason: 'heap growth over 5 consecutive GCs (39s) - 255.81 mb/hr' }

{ growth: 2435912,

  reason: 'heap growth over 5 consecutive GCs (28s) - 298.68 mb/hr' }

hourly image sending

{ growth: 2201784,

  reason: 'heap growth over 5 consecutive GCs (29s) - 260.66 mb/hr' }

{ growth: 2109960,

  reason: 'heap growth over 5 consecutive GCs (25s) - 289.76 mb/hr' }

{ growth: 2164688,

  reason: 'heap growth over 5 consecutive GCs (25s) - 297.27 mb/hr' }

{ growth: 3529360,

  reason: 'heap growth over 5 consecutive GCs (45s) - 269.27 mb/hr' }

{ growth: 3621616,

  reason: 'heap growth over 5 consecutive GCs (44s) - 282.59 mb/hr' }
#17

Now I just recieved this, never seen before

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

(node:1381) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 11)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 13)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 14)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 15)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 17)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.58.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 18)

(node:1381) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 104.16.59.5:443

    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)

(node:1381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 19)

and this is my memory now

93%, 476/512MB
#19

@cori anything new yet?

#20

Hey @Callum-OKane in depth analysis of a problem like this is something you’ll need to tackle; it’s not something we’re able to commit to investigating.

That said, what I think you’ll want to do next if you’re going to dig into the details is to use memwatch-next’s Heap Diffs around different operations your bot is doing to try to isolate the actually leaking code.