# Node-red application gradually increases memory usage until crashing

**URL:** https://discourse.nodered.org/t/node-red-application-gradually-increases-memory-usage-until-crashing/39012
**Category:** General
**Created:** [12 January 2021 17:12 UTC](https://discourse.nodered.org/t/node-red-application-gradually-increases-memory-usage-until-crashing/39012 "2021-01-12T17:12:45Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [8 February 2021 21:58 UTC](https://discourse.nodered.org/t/node-red-application-gradually-increases-memory-usage-until-crashing/39012/12 "2021-02-08T21:58:22Z")

</div>

Hi @nikhilkinkar,  
I'm FAR from a memory expert.  
But could it perhaps be of any help to:

- Use my [node-red-contrib-heap-dump](https://flows.nodered.org/node/node-red-contrib-heap-dump) node to create two heap dumps (with some time in between), and compare two heap dumps using an external tool (e.g. Chrome) to analyze the difference.

- Start your Node-RED in debug mode and connect with a Chrome debugger to NodeJs (as I described [here](https://discourse.nodered.org/t/debug-js-code-inside-function-node/26925/14)). Then you can go to the "Memory" tabsheet, and see the memory live or take heap dumps and compare them, and ...

There are a lot of tutorials (like this [one](https://marmelab.com/blog/2018/04/03/how-to-track-and-fix-memory-leak-with-nodejs.html)) available to describe how you can do that. So perhaps you have already tried this kind of analysis?

You talk about the **node-red-contrib-opcua** node. I don't know how it works, but perhaps it uses memory (e.g. C++) that is managed outside of the V8 engine (which is running NodeJs and manages all NodeJs memory). In that case perhaps you won't find anything using heap dumps. But it is just an assumption ...

Good luck with it!  
Bart

---

_[View the full topic](https://discourse.nodered.org/t/node-red-application-gradually-increases-memory-usage-until-crashing/39012)._
