Skip to content

v8 heapTotal keeps rising when heapUsed does not #1484

Closed
@eladnava

Description

@eladnava
  • Node.js Version: v8.11.4 LTS
  • OS: Ubuntu 16.04 LTS

When running my app with a --max-old-space-size=16384 the heapTotal keeps rising although the heapUsed remains pretty much the same:

screen shot 2018-09-07 at 7 28 13 pm

global.gc() is run every 3 minutes precisely. The machine itself has exactly 16GB of RAM. Eventually this behavior leads to an OOM and node is killed.

Now originally I thought this was a memory leak but since heapUsed remains constant it can't be, can it? Is it a native memory leak possibly? Or just the heapTotal growing uncontrollably due to some bug in node core?

Interestingly as well, the gap between rss and heapTotal keeps growing over time, due to some native memory leak outside v8 heap?

Any pointers as to what's going on would be super helpful. Unfortunately I cannot provide code to reproduce currently, but I can say that the load on the server and number of concurrent connections remains the same throughout the test.

I'm also considering testing with a lower --max-old-space-size to see if it forces node to keep the heapTotal a certain size.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions