Content-Length: 331301 | pFad | https://github.com/aws/aws-cdk/pull/1336

7E Allow v8 to allocate more heap by otterley · Pull Request #1336 · aws/aws-cdk · GitHub
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

Allow v8 to allocate more heap #1336

Merged
merged 2 commits into from
Dec 20, 2018
Merged

Conversation

otterley
Copy link
Contributor

@otterley otterley commented Dec 12, 2018

Prevent out-of-memory errors encountered during lerna bootstrap on
certain systems by allowing Node's v8 engine to allocate more heap. The
default, even on 64-bit architectures, is too small (1.4GB) to
complete compilation successfully, so we set it to 4GB for the bootstrap
phase.

Fixes #1335


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@otterley otterley requested a review from a team as a code owner December 12, 2018 17:01
@rix0rrr
Copy link
Contributor

rix0rrr commented Dec 12, 2018

Wow. I am surprised that this is necessary. Thanks.

@otterley
Copy link
Contributor Author

otterley commented Dec 12, 2018

Please hold on merging - there are more cases where v8 is running out of memory, for example, when building modules. More patches forthcoming.

@otterley otterley force-pushed the fix_mem_exhaustion branch 2 times, most recently from 8353e1b to a79d727 Compare December 12, 2018 18:18
@otterley
Copy link
Contributor Author

OK, I've updated all the scripts I could find that invoke lerna.

Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me, but as I commented, I think it could be nice to allow people to use NODE_OPTIONS to alter other knobs (I do this quite a bit) - so I would simply forward the existing NODE_OPTIONS...

build.sh Outdated
@@ -41,6 +41,7 @@ BUILD_INDICATOR=".BUILD_COMPLETED"
rm -rf $BUILD_INDICATOR

export PATH=node_modules/.bin:$PATH
export NODE_OPTIONS="--max-old-space-size=4096"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, I'd like those to be additive:

export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS}"

@otterley otterley force-pushed the fix_mem_exhaustion branch 4 times, most recently from 708f29e to 9379d5d Compare December 14, 2018 18:13
Prevent out-of-memory errors encountered during `lerna bootstrap` on
certain systems by allowing Node's v8 engine to allocate more heap.  The
default, even on 64-bit architectures, is too small (1.4GB) to
complete compilation successfully, so we set it to 4GB for the bootstrap
phase.
@otterley
Copy link
Contributor Author

@RomainMuller Addressed your issues - PTAL

@RomainMuller
Copy link
Contributor

@otterley awesome! Thank you very much!!

@RomainMuller RomainMuller merged commit ee32cc6 into aws:master Dec 20, 2018
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.

4 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/aws/aws-cdk/pull/1336

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy