Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to set --max-old-space-size on server #1299

Merged
merged 3 commits into from May 13, 2022

Conversation

ALiangLiang
Copy link
Contributor

It's a workaround to solved JavaScript heap out of memory

Motivation

I have problem on JavaScript heap out of memory. I found many related issues but many of them closed by lack of info to repro

$ echo "In my case"
$ NODE_OPTIONS='--max_old_space_size=700' npx vue-tsc --noEmit 
<--- Last few GCs --->

[12514:0x56b6af0]    26053 ms: Mark-sweep (reduce) 698.3 (711.3) -> 697.3 (711.1) MB, 220.5 / 0.0 ms  (average mu = 0.167, current mu = 0.156) allocation failure scavenge might not succeed
[12514:0x56b6af0]    26105 ms: Scavenge (reduce) 698.4 (711.1) -> 697.7 (711.1) MB, 5.2 / 0.0 ms  (average mu = 0.167, current mu = 0.156) allocation failure 


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
...

I tried the solutions:

  1. Turn on volar.lowPowerMode: failed
  2. Use take over mode: failed
  3. Remove Vetur: failed
  4. Set --max-old-space-size=6144 on server: success

@johnsoncodehk
Copy link
Member

Thanks for your investigation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants