Skip to content

Node 12 dynamic heap size maxes out at 2048MB #28202

Description

@filipesilva
  • Version: 12.4.0
  • Platform: Linux
  • Subsystem:

Hi there. The Node 12 announcement contained a section about dynamic heap limits:

Properly configure default heap limits

This update will configure the JavaScript heap size based on available memory instead of using defaults that were set by V8 for use with browsers. In previous releases, unless configured, V8 defaulted to limiting the max heap size to 700 MB or 1400MB on 32 and 64-bit platforms respectively. Configuring the heap size based on available memory ensures that Node.js does not try to use more memory than is available and terminating when its memory is exhausted.

This is particularly useful when processing large data-sets. As before, it will still be possible to set — max-old-space-size to use a different limit if the default is not appropriate for your application.

The "will configure the JavaScript heap size based on available memory" part made me think the new limit was always relative to the total available memory. But as far as we can tell in angular/angular-cli#13734 (comment), there's still a default maximum at 2048MB.

Is this new default maximum intended? The blog post doesn't mention any maximum, just that it's based on available memory.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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