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

High memory usage on serve #8254

Closed
fknop opened this issue Oct 30, 2017 · 12 comments
Closed

High memory usage on serve #8254

fknop opened this issue Oct 30, 2017 · 12 comments
Assignees
Labels
needs: investigation Requires some digging to determine if action is needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@fknop
Copy link

fknop commented Oct 30, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

I noticed a high memory usage using the last version of CLI when runningng serve. It starts with a normal amount of memory allocated. And then for every change made to the project files, it seems that the previous memory allocated for the build is not freed and the memory keeps growing until I have to stop the process and start again.

Versions.

Angular CLI: 1.5.0-rc.6
Node: 7.6.0
OS: win32 x64
Angular: 5.0.0-rc.8
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router

@angular/cdk: 2.0.0-beta.12
@angular/cli: 1.5.0-rc.6
@angular/flex-layout: 2.0.0-beta.9
@angular/material: 2.0.0-beta.12
@angular-devkit/build-optimizer: 0.0.31
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0-rc.6
@schematics/angular: 0.0.48
typescript: 2.5.3
webpack: 3.8.1

Repro steps.

I would need to try on a new generated project if it does the same thing.

The log given by the failure.

Here is 2.6G of RAM allocated for the serve process.

image

And 5 minutes after

image

Desired functionality.

Mention any other details that might be useful.

@CaerusKaru
Copy link
Member

Duplicate of #5613

@clydin
Copy link
Member

clydin commented Oct 31, 2017

With 1.5 and Angular 5 a new compiler is used so this may not be a dupe.

@fknop Can you try with the latest RC of 1.5?

@fknop
Copy link
Author

fknop commented Oct 31, 2017

@clydin Is rc6 not already the latest rc ?

Edit: ok nevermind, I just saw rc-8 was out, I was looking at the releases on GitHub and there was no changelog.

I'll will try later then!

@fknop
Copy link
Author

fknop commented Oct 31, 2017

@clydin High memory usage is still there but it seems to grow much slower.

@CaerusKaru
Copy link
Member

Also being tracked by #8259, reverting some behavior in next RC/final (keep an eye out for it, PR is #8267)

@hansl
Copy link
Contributor

hansl commented Oct 31, 2017

I'm going to do another RC today for that PR and the sourcemaps ones.

@theunreal
Copy link

I'm facing the same issue, annoying... latest angular & latest cli

@ar53n
Copy link

ar53n commented Nov 2, 2017

Also have this problem and have problem when ng build FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

@filipesilva filipesilva self-assigned this Nov 2, 2017
@filipesilva filipesilva added needs: investigation Requires some digging to determine if action is needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: discussion labels Nov 2, 2017
@shanehsu
Copy link

I noticed that it eats a lot of memory even in the release build. Can anyone else reproduce that also?

@voznik
Copy link

voznik commented Nov 18, 2017

#5613 (comment)

@filipesilva
Copy link
Contributor

For discussion about the amount of memory used by ng serve, please use #5613 instead. For the memory usage in ng build --prod please use #5618.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: investigation Requires some digging to determine if action is needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

9 participants