question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After upgrading angular 11 to 12, CPU utilization goes 100%

See original GitHub issue

Bug Report

Affected Package

This issue is caused by package @angular/core and @angular/cli but not sure yet.

Is this a regression?

With Angular 11, everything is fine, but after upgrading to 12, cup goes 100%.

Description

Our project is not that big, maybe small. And we were using Angular 11 with Angular Material and also Angular universal for SSR. Today, I read about Angular 12 release so updated project version to 12. After that server went down every 10 minutes and we made some investigation and found that pm2 instance occupying CPU utilization 102%.

As a temporary solution, I downgraded it again to 11 and all became fine.

Minimal Reproduction

Not sure how can I reproduce error, just reporting this issue to Angular team. But I am attaching screenshot. angular12 angular11

Exception or Error

Please check the screenshots.

Your Environment

Angular Version:


Angular: 12.0.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, material, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.0
@angular-devkit/build-angular   12.0.0
@angular-devkit/core            12.0.0
@angular-devkit/schematics      12.0.0
@nguniversal/builders           12.0.0
@nguniversal/express-engine     12.0.0
@schematics/angular             12.0.0
@schematics/update              0.1102.5
rxjs                            6.6.7
typescript                      4.2.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
alan-agius4commented, May 15, 2021

I have a hunch that this is related to critical css inlining.

Can you try disabling it in your server file.

    ngExpressEngine({
      bootstrap: AppServerModule,
      inlineCriticalCss: false,
    }),
1reaction
JoostKcommented, May 14, 2021

Heya, I’m sorry to hear you’re having issues after the update. Unfortunately however I don’t think there’s enough information in this report for us to investigate further, so I’m afraid this isn’t actionable right away.

Can you try to determine where the CPU time is spent? Ideally you can attach a debugger and trigger some requests, which could hopefully provide some insights into what’s going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular CLI - ng serve - high cpu usage from node process
In Angular development context; transpilation/compilation causes CPU spike. When this happens too frequent, your system is in trouble.
Read more >
How To Fix the Most Common Angular Performance Problems ...
This post is about how to improving performance in Angular apps by using a ... The first steps should always be identification, exactly...
Read more >
Windows 11 bug. Process uses 100% of the CPU
After exactly 11 minutes without using the computer a process called "AddInProcess" uses 100% of my CPU and as soon as i move...
Read more >
3 Tips for Angular Runtime Performance from the Real World
Run event handlers; Update data bindings; Propagate DOM updates and repaint. Let's look at a few simple ways that we can improve each...
Read more >
Angular 13 Released: Top New Features and Updates You ...
The new release of Angular version 13 is now available. ... If you are still using the older Angular v12, it's time to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found