
We just released a Magic Dashboard for Garbage Collection stats for our Node.js integration. If you are leaking memory, this dashboard will help you discover and fix this problem. No setting up is required, this dashboard will magically automatically appear among the rest of your dashboards. ✨
Garbage Collection
Garbage collection (GC) can have a big impact on the performance of your apps. GC is a process that the Node.js runtime regularly runs to clean up any objects that were created and are not used anymore.
If you create a lot of objects in your code (or a dependency does) this can slow down your app. It's therefore a good idea to keep an eye on this. We shipped GC magic dashboard to make this easy for you!
Once you upgrade your node package to 1.2.0
and deploy your app a new
Node.js Heap Statistics
dashboard will appear. Let's look at what data is on the dashboard!
Heap Statistics
Node.js reserves memory to store your objects in. This is called the "heap". The top graph in the dashboard displays the total size of your heap, and how much of it is used.

If you see a lot of variation here that's an indication something might be off. In this screenshot we put some load on this test app, and then stopped requesting pages for a bit. You can clearly see that the Node.js runtime reacted to this by making the heap smaller.
If you see this graph steadily increasing there might be a memory leak in your code, or in a dependency.
Contexts
The second graph on this dashboards show the number of currently active top-level contexts. This number should regularly stay stable, otherwise this would indicate a potential memory leak.

The third graph shows the number of contexts that were detached and not yet garbage collected. If this number is not zero you might have a memory leak to deal with.

More Magic ✨
To learn more about garbage collection be sure to out our detailed blog post on this subject.
We also have Magic Dashboards for Next.js and PostgreSQL. If you like the way we make monitoring easier, we won't stop you from trying us out. It's a five minute install on localhost and you can try us out for free (no credit card required).
Wondering what you can do next?
Finished this article? Here are a few more things you can do:
- Try out AppSignal with a 30-day free trial.
- Reach out to our support team with any feedback or questions.
- Share this article on social media
Most popular AppSignal articles
Easily Monitor Multiple Heroku Apps with AppSignal
You can now monitor multiple Heroku apps from a single AppSignal instance.
See moreFine-Tune Your Charts with Minutely Metrics in AppSignal
Discover how minutely metrics in AppSignal deliver precise performance monitoring. Check out detailed performance data, spot anomalies quickly, troubleshoot issues more efficiently, and optimize your application's performance.
See moreSecure Your Sign-Ins with AppSignal's Single Sign-On
Secure team sign-ins and enhance access management with AppSignal's Single Sign-On Business Add-On. Integrate AppSignal with your identity provider for seamless, secure access management.
See more

Thijs Cadier
Thijs is a co-founder of AppSignal who sometimes goes missing for months on end to work on our infrastructure. Makes sure our billions of requests are handled correctly. Holds the award for best drummer in the company.
All articles by Thijs CadierBecome our next author!
AppSignal monitors your apps
AppSignal provides insights for Ruby, Rails, Elixir, Phoenix, Node.js, Express and many other frameworks and libraries. We are located in beautiful Amsterdam. We love stroopwafels. If you do too, let us know. We might send you some!
