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

Multiple Builds memory issue #3400

Closed
homerjonathan opened this issue Apr 12, 2019 · 5 comments
Closed

Multiple Builds memory issue #3400

homerjonathan opened this issue Apr 12, 2019 · 5 comments
Labels

Comments

@homerjonathan
Copy link

My project is getting quite large and I have 3 builds say, production, development and localtest. If I use polymer build the build fails with memory heap error. However if I run

polymer build --name production
polymer build --name development
polymer build --name localtest

It works perfectly. When running effectively 3 builds at the same time it can exhaust the memory. I had expected the CLI to run build for each version behind the scenes and not require much more memory. I have also found that running the build command separately for each build required is quicker despite running it 3 times instead of once.

@jsilvermist
Copy link
Contributor

jsilvermist commented Apr 12, 2019

Please note that you are naming a default build (which I don't think includes compiling or minifying) and not selecting builds from polymer.json when you use --name in this way.

@rbjarnason
Copy link

This works for me, adjust the memory size as needed:
NODE_OPTIONS="--max-old-space-size=2072" polymer build

@homerjonathan
Copy link
Author

You are correct when building with the --name I thought it would "look up" the build instructions, however it doesn't. I have ran polymer build with just one item in the builds list and it then builds correctly. It may be worth adding an option similar to --name to choose which build you want to save memory.

Thanks for the suggestion this works with one item. It also completes the build process a bit faster as well. However with the three builds it fails to build.

It seems that my only option is to use the --name option but add the build options as a work around.

@stale
Copy link

stale bot commented Apr 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 18, 2020
@stale
Copy link

stale bot commented Apr 21, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

@stale stale bot closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants