镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

--max_old_space_size unreliable for values >= 2^31 #18786

Description

@maneshdas

Hello,

Unexpectedly terminating Node process due to out of memory issue and tried to extend memory size by setting Node - V8 option "--max_old_space_size". It works as expected in some machines but NOT consistent across machines and different applications (NOT working in pre-prod which is in AWS). Sometimes it decreasing memory too.
Doest it depending on any other factors? Kindly advice.

Node version - 4.5

Thanks!

  • Version:
  • Platform:
  • Subsystem:

Activity

  1. bnoordhuis commented on Feb 14, 2018

    @bnoordhuis
    Member

    Can you post your question to the help repo? Thanks.

  2. added
    questionIssues asking questions about Node.js.
    wrong repoIssues that should be opened in another repository.
    on Feb 14, 2018
  3. bnoordhuis commented on Feb 20, 2018

    @bnoordhuis
    Member

    Reopening, see nodejs/help#1111 (comment). Looks like V8 is still using a 32 bits int to store --max_old_space_size.

  4. added
    v8 engineIssues and PRs related to the V8 dependency.
    and removed
    questionIssues asking questions about Node.js.
    wrong repoIssues that should be opened in another repository.
    on Feb 20, 2018
  5. changed the title [-]NOT Increasing Node (v4.5) process memory by using --max_old_space_size V8 option[/-] [+]--max_old_space_size unreliable for values >= 2^31[/+] on Feb 20, 2018
  6. bnoordhuis commented on Feb 20, 2018

    @bnoordhuis
    Member
  7. maneshdas commented on Feb 21, 2018

    @maneshdas
    Author

    Thanks a lot to take this further!

    Is there any quick solution to overcome process out of memory issue other than code optimisation?

    I tried --max_old_space_size=3072 (±3GB) but still FAILED!! :( in AWS production machine (but worked fine with local Mac osx machines)

    Any workaround would be appreciated!

    Thanks!

  8. maneshdas commented on Feb 21, 2018

    @maneshdas
    Author

    It would be great if you can suggest the maximum possible value for --max_old_space_size
    Node JS version: 4.8.7

    Thanks!

  9. bnoordhuis commented on Feb 21, 2018

    @bnoordhuis
    Member

    I think you should be good with values < 2048.

  10. maneshdas commented on Feb 22, 2018

    @maneshdas
    Author

    Unfortunately still it is not working!
    We're using PM2 to launch the Node instance and monitor. Here is the command

    pm2 start /home/sever/src/bin/app.js -i 1 --name app_server --node-args="--max_old_space_size=2048"

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

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions