O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dumping heap

A heap is a huge memory allocation. When we talk about our case, it is the memory allocated to the V8 process (time to recall how Node.js works—the Event Loop and the memory allocation).  By checking the memory usage, you can track down things such as memory leaks or just check which part of the service has the most consumption, based on which you can adjust the code accordingly. We have a very fine npm module (https://github.com/bnoordhuis/node-heapdump), which take a dump that can be used later for inspection. Let's get familiar with reading the dump process and when to take a dump, though the following steps:

  1. We install Heap Dump and create a dump ready to be used. Open up any project, and install the heapdump module with: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required