Business objects retained by Global Handles in heap dump

34 views
Skip to first unread message

Russ Frank

unread,
Oct 9, 2016, 1:56:11 AM10/9/16
to nodejs
Hey,

I have a heap dump (obtained with bnoordhuis/node-heapdump) of a production node process that had a large heap. I found a bunch of business objects retained by "(Global Handles)". I'm wondering how a JS object can end up being retained in this way. Would it need to go through a native extension which is accidentally creating such a global handle and thereby retaining the object?

Thanks.

Zlatko

unread,
Oct 10, 2016, 9:50:32 AM10/10/16
to nodejs


On Sunday, October 9, 2016 at 7:56:11 AM UTC+2, Russ Frank wrote:
I have a heap dump (obtained with bnoordhuis/node-heapdump) of a production node process that had a large heap. I found a bunch of business objects retained by "(Global Handles)". I'm wondering how a JS object can end up being retained in this way. Would it need to go through a native extension which is accidentally creating such a global handle and thereby retaining the object?


I don't think it needs a native extension there - a simple variable leak can do that. Some code analysis tools can help you check your javascript parts for such issues, not sure about the extension. Is that something occurring regularly? 

Ben Noordhuis

unread,
Oct 10, 2016, 9:53:03 AM10/10/16
to nod...@googlegroups.com
A native extension is the most plausible culprit, yes.
Reply all
Reply to author
Forward
0 new messages