-
Notifications
You must be signed in to change notification settings - Fork 12k
Out of memory error when building with AOT #3651
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
Comments
Probably not a leak, just a cap on your node heap. For others also seeking help with this, the issue is known to plague the CLI (#1652, #2974, #3099) when projects grow beyond what many of us consider small-medium sized codebases. The fix it to set Node's heap size. This is done with |
Don't really think that this process requires so much memory, either there is a memory leak, either there is a room for huge optimizations |
I just built my project into a freshly generated |
I was able to build PHP projects, Grunt, Gulp, Phing and Bower projects with a machine that had only 1GB of Ram (Ubuntu 14). That machine compiled my Angular 1 projects for the last 2 years without any issues, and all my other projects. My first Angular 2 with just a few components triggered this out of memory error. Had to upgrade my node to 2GB just to restore nightly builds. I also ran out of memory doing |
btw even with |
Dupe of #1652 as @gelliott181 mentioned. It's better to keep issue discussion in a single thread. |
Any suggestion or trick to find the memory leak or where the optimisation is needed? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When I run
ng build --prod --aot
it goes fine until 40%, then it becomes slow, and once it gets to 64% it stucks. It stucks for ~10 minutes and throws exception:
mac OSX El Capitan
angular-cli: 1.0.0-beta.22-1
node: 6.6.0
Looks like there is memory leak somewhere. We have a big project. 1500 typescript files and almost 100k lines of code.
The text was updated successfully, but these errors were encountered: