Memory leak tracking in Vue.js server side?

We have a Vue.js application (v2.2.6) running on a server with server-side rendering, based on the structure of the Hacker News demo application . We have a memory leak due to which the process ends from memory and crashes after about 6-12 hours, and we started to take heap snapshots on the server to try and track the problem.

Nevertheless, we dig these days for many days and will not go anywhere. What sticks out (as you can see in the screenshot below) is that there are many instances of VueComponentand Vue$2that are created and never deleted from memory. I don’t know enough about the Vue server-side rendering internals to find out if this is real leadership and where to look from there, if any.

enter image description here enter image description here

Does anyone come across something like this or have any ideas where we can see what could be causing this?

+4
source share
1 answer

, , , , : LLDB llnode. , Joyent SmartOS mdb, , .

dumpme node, ( , ).

, https://developer.ibm.com/node/2016/09/27/advances-in-core-dump-debugging-for-node-js/, VueComponents, .

> lldb node -c core
(lldb) plugin load ./node_modules/llnode/llnode.so
(lldb) v8 findjsobjects
(lldb) v8 findjsinstances VueComponent
(lldb) v8 inspect ...

, setTimeout, , , .

+2

Source: https://habr.com/ru/post/1673722/


All Articles