# Memory Leak - Troubleshooting

**URL:** <https://discourse.nodered.org/t/memory-leak-troubleshooting/20389>\
**Category:** General\
**Created:** [15 January 2020 16:16 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389 "2020-01-15T16:16:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelparsche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelparsche/32/16190_2.png) [@michaelparsche](https://discourse.nodered.org/u/michaelparsche)\
**Post date:** [15 January 2020 16:16 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/1 "2020-01-15T16:16:07Z")

</div>

I am using the Node-RED running in a Docker container on Ubuntu. When Node-Red starts it consumes about 2.6GB of memory, then in less than 24 hours it is up to 5.95GB (which is near the maximum available). I think there is a memory leak, how can I troubleshoot the issue?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [15 January 2020 16:22 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/2 "2020-01-15T16:22:22Z")

</div>

Hi and welcome 🙂

Can we try and simplify the problem

Does it happen with a completely empty flow or with a set of them

Can you (temporary if needed) do a standard (non-docker) install - does it behave the same or not

If you can - post your flow here and maybe someone can test if out on their machine using Docker

---

<div class="post-metadata">

**Author:** ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)\
**Post date:** [15 January 2020 16:39 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/3 "2020-01-15T16:39:17Z")

</div>

Just a shot in the dark, but I had similar issue when I first started using node-red.

Turned out, Ii you use an rbe node on binary data its pretty much inevitable.

Here is the followup thread to the original where I stumbled onto the solution:

[https://discourse.nodered.org/t/memory-leak-what-am-i-doing-wrong/627/23](https://discourse.nodered.org/t/memory-leak-what-am-i-doing-wrong/627/23)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 January 2020 17:53 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/4 "2020-01-15T17:53:57Z")

</div>

> [@michaelparsche](#):
>
> When Node-Red starts it consumes about 2.6GB

My non-docker install of node-red on Ubuntu says it is using 96MiB.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 January 2020 18:27 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/6 "2020-01-15T18:27:38Z")

</div>

70MiB on my Windows 10 test setup which includes quite a number of uibuilder, moment, fs and other test flows.

---

<div class="post-metadata">

**Author:** ![michaelparsche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelparsche/32/16190_2.png) [@michaelparsche](https://discourse.nodered.org/u/michaelparsche)\
**Post date:** [16 January 2020 02:48 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/7 "2020-01-16T02:48:20Z")

</div>

I tried a non-Docker install and it only uses 1.53GB and it stays the same.

So, I think that I will continue with the non-Docker install.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 January 2020 07:13 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/8 "2020-01-16T07:13:45Z")

</div>

> [@michaelparsche](#):
>
> 1.53GB

That is still ten or twenty times what is usual. You need to understand why. Are you handling big video files or something?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [16 January 2020 10:14 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/9 "2020-01-16T10:14:20Z")

</div>

> [@Colin](#):
>
> You need to understand why.

Maybe they don't 🙂

Maybe they are quite happy that it works 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 January 2020 13:54 UTC](https://discourse.nodered.org/t/memory-leak-troubleshooting/20389/10 "2020-01-16T13:54:19Z")

</div>

Unless there is a good and understood reason for it using so much space then there is a strong possibility that the fact that it is apparently working correctly is just an illusion.
