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.

Heap memory out issue in the new jsdom based SSR engine

See original GitHub issue

Background We recently changed the SSR rendering engine in our angular ssr app from express to clover. (We had to change the rendering engine in order to implement Microfrontends).

Issue: We are using the new jsdom based ssr engine clover via the @nguniversal/common, (12.1.0) but our app is experiencing Heap memory out issue.

As the requests to the node server increases, we are seeing that heap memory is also increasing continuously and garbage collection is not happening. At around 400rpm, it is crashing with this error. We observed that at this requests rate, memory becomes 1GB in one or 2 minutes of running the app.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

** version details** “@angular/compiler”: “12.2.10”, “@angular/core”: “12.2.10”, “@nguniversal/express-engine”: “^11.2.1”, “@nguniversal/common”: “12.1.0”, “@nguniversal/builders”: “11.2.1”

Same app is working fine and is in production with express engine.

Can anyone help us with any pointers regarding this?

OR can you confirm if clover engine is production ready?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
sandeep-venugopalcommented, Jul 8, 2022

Clover is still experimental. Would you be able to provide heap snapshots?

@alan-agius4 Thanks for the reply.

Below is the link to heap snapshots - https://drive.google.com/drive/folders/1RLjzLfGhkhv0qhqPVsZeVG2E7PZy1vPR?usp=sharing

0reactions
angular-automatic-lock-bot[bot]commented, Nov 7, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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