# How would I find a "memory leak"?

**URL:** <https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806>\
**Category:** General\
**Created:** [20 September 2026 09:43 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806 "2026-09-20T09:43:17Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 11:26 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/21 "2026-09-20T11:26:44Z")

</div>

Greatest apologies.

I thought I did `<ctrl> m` on them too.

Stand by.

(oops)

BedPi

 ![BedPi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/01c4790ded1198b5556da87760ae2eb4280de216.png)

TimePi

 ![TimePi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d474a5308cdb83ce722b0bce6c2282d9c6e90d12.png)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 11:36 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/22 "2026-09-20T11:36:04Z")

</div>

Machine fully rebooted.

 ![Screenshot from 2026-09-20 21-32-56](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f21e8d536b80c291a8e9be496779ce626788ff50.jpeg)

`top` with `ctrl m` pressed.

 ![Screenshot from 2026-09-20 21-34-46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/2/12d3f27b95926d5b69a6359788c407f157647246.png)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 11:47 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/23 "2026-09-20T11:47:30Z")

</div>

In `14` minutes of up tie the memory usage has gone from `46%` to `47%`

## (edit)

OK, I have a lot of `q-gates`, but even so..... if the machine has 1 GIG of memory.....  
Nah, can't be those.

Ok, a few `graphs`. As seen on the screen shots.  
Maybe.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [20 September 2026 12:06 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/24 "2026-09-20T12:06:33Z")

</div>

It looks like all of these machines are the 1GB version so it's not too surprising that if there is a problem it shows up as out of memory.

Like @Colin I run the Lite OS on my Pies. I think you are consuming a lot of system resources for little gain by running the desktop.

Looking at your machines TelePi, BedPi and TimePi, all three of them are using swap space.  
If they are swapping to the SD card it's bad - slow and wears out the card.  
It would be interesting to see the output of `cat /proc/swaps` and `free -h` for all three Pies.

With PiOS Trixie, the Pi folk have started using memory based swap space (zram?) by default, even on a Pi Zero 2 with only 512MB. My impression is that it does improve performance, and I have zram installed on older versions of PiOS.

In your position I would disable the desktop and install zram as the first steps in tracking down your possible memory leak.  
Actually I would take this as the spur to upgrade to Trixie Lite. A lot of effort I know. ☹  
Not so bad with Node-red, you can restore from a backup fairly easily. It's all the other applications on the Pi that make it hard.  
I've found upgrading my PiHole device especially tricky since of course it borks your internet for part of the process,

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 12:13 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/25 "2026-09-20T12:13:08Z")

</div>

In answer to the questions you asked:

TimePI

```auto
pi@TimePi:~ $ cat /proc/swaps
Filename Type Size Used Priority
/var/swap file 102396 102396 -2
pi@TimePi:~ $ free -h
              total used free shared buff/cache available
Mem: 923Mi 534Mi 96Mi 51Mi 292Mi 280Mi
Swap: 99Mi 99Mi 0B
pi@TimePi:~ $ 

```

TelePi

```auto
pi@TelePi:~ $ cat /proc/swaps
Filename Type Size Used Priority
/var/swap file 204796 0 -2
pi@TelePi:~ $ free -h
              total used free shared buff/cache available
Mem: 871Mi 349Mi 180Mi 10Mi 342Mi 456Mi
Swap: 199Mi 0B 199Mi
pi@TelePi:~ $

```

BedPi

```auto
pi@BedPi:~ $ cat /proc/swaps
Filename Type Size Used Priority
/var/swap file 1048572 180168 -2
pi@BedPi:~ $ free -h
              total used free shared buff/cache available
Mem: 923Mi 393Mi 118Mi 40Mi 410Mi 433Mi
Swap: 1.0Gi 175Mi 848Mi
pi@BedPi:~ $ 

```

Hmmmm....  
Ok, interesting.  
I thought all 3 were the same.

But Tele and Bed are the same.

Yet Bed isn't _leaking memory_ as Tele is.  
(Strike that. I'm wrong.)  
Confused.

So TelePi doesn't have it's swap active - yes?  
But the other 2 do?

Anyway.  
That's where things are.

---

<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:** [20 September 2026 12:15 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/26 "2026-09-20T12:15:02Z")

</div>

It's shift M not ctrl. You could see that it had not sorted by memory useage. When asked to do something do you not look at the result?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 12:16 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/27 "2026-09-20T12:16:14Z")

</div>

(I'm stupid.)

Sorry.

Do you want the correct memory usage shots then?

Just checking.

 ![BedPi memory use](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/180d17a7125923fe2ef53ed6e2d72a3f60974c4c.png)  
 ![TelePi memory use](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f05fdf63cb3d905ac2665ea24c963115e189b9e0.png)  
 ![TimePi memory use](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/ca9ee2908c56116f8d43ea6a9b89fc207f8a4e6e.png)

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [20 September 2026 12:22 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/28 "2026-09-20T12:22:23Z")

</div>

These are all using a swap file, I don't understand how that equates with your statement that you have the SD swap file disabled.

TimePi is using 100% of available swap space. In my limited understanding, this is a catastrophe and processes are likely to grind to a halt. I know, you don't see this machine as having a problem!

Edit - The default swap settings are for the OS to be reluctant to swap and reluctant to release used swap space. So I guess the 100% figure might reflect a high water mark in the past rather than a dire current situation.

TelePi is not [yet] swapping because you recently rebooted it.  
Zero [file based] swapping is what you should see on a healthy system, but I have no doubt it will start to swap as uptime increases.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 12:29 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/29 "2026-09-20T12:29:52Z")

</div>

Ok, thanks.

Interesting.

I read about the _DANGERS_ of swap files and SD cards and disabled them.

But that was a while ago. (Years)

Seems ITMT, I enabled them again. Reason: unknown.

TimePI has had 1+ year of constant uptime - no reboots. NR has been restarted a couple of times I'm sure.

(from the command log)

```auto
2025/05/24 21:29:29 >> Test1 <<
2025/05/24 21:29:34 >> Backup <<
2025/05/24 21:29:34 >> Backup <<
2025/05/25 08:41:38 >> Backup <<
2025/05/25 08:41:38 >> Backup <<
2025/06/04 22:48:52 >> Shutdown <<
2025/06/04 22:48:52 >> Shutdown <<
2025/06/05 21:55:32 >> Reboot <<
2025/06/05 21:55:32 >> Reboot <<
2025/06/05 23:00:51 >> Backup <<
2025/06/05 23:00:51 >> Backup <<
2025/06/07 14:40:02 >> Backup <<
2025/06/07 14:40:02 >> Backup <<
2025/06/07 14:49:29 >> Backup <<
2025/06/07 14:49:29 >> Backup <<
2025/06/07 17:04:46 >> Backup <<
2025/06/07 17:04:46 >> Backup <<
2025/06/07 20:29:37 >> Backup <<
2025/06/07 20:29:37 >> Backup <<
2025/06/08 22:12:35 >> Backup <<
2025/06/08 22:12:35 >> Backup <<
2025/06/09 09:53:37 >> Backup <<
2025/06/09 09:53:37 >> Backup <<
2025/06/09 16:57:52 >> Backup <<
2025/06/09 16:57:52 >> Backup <<
2025/06/10 14:03:26 >> Backup <<
2025/06/10 14:03:26 >> Backup <<
2025/06/11 09:04:21 >> Backup <<
2025/06/11 09:04:21 >> Backup <<
2025/06/11 11:46:50 >> Backup <<
2025/06/11 11:46:50 >> Backup <<
2025/06/13 17:43:33 >> Backup <<
2025/06/13 17:43:33 >> Backup <<
2025/06/14 20:26:32 >> Backup <<
2025/06/14 20:26:32 >> Backup <<
2025/06/14 21:38:45 >> Backup <<
2025/06/14 21:38:45 >> Backup <<
2025/06/15 11:13:12 >> Backup <<
2025/06/15 11:13:12 >> Backup <<
2025/06/15 11:31:24 >> Backup <<
2025/06/15 11:31:24 >> Backup <<
2025/06/17 10:04:10 >> Backup <<
2025/06/17 10:04:10 >> Backup <<
2025/06/24 21:11:17 >> Backup <<
2025/06/24 21:11:17 >> Backup <<
2025/07/06 17:34:13 >> Backup <<
2025/07/06 17:34:13 >> Backup <<
2025/07/26 08:02:34 >> Backup <<
2025/07/26 08:02:34 >> Backup <<
2025/07/29 21:52:24 >> Backup <<
2025/07/29 21:52:24 >> Backup <<
2025/08/01 07:36:14 >> Backup <<
2025/08/01 07:36:14 >> Backup <<
2025/08/24 14:05:11 >> Backup <<
2025/08/24 14:05:11 >> Backup <<
2025/08/25 19:57:03 >> Restart <<
2025/08/25 19:57:03 >> Restart <<
2025/08/26 09:44:52 >> Backup <<
2025/08/26 09:44:52 >> Backup <<
2025/08/26 19:05:44 >> Backup <<
2025/08/26 19:05:44 >> Backup <<
2025/08/26 20:12:49 >> Test1 <<
2025/08/26 20:12:49 >> Test1 <<
2025/08/26 21:22:47 >> Backup <<
2025/08/26 21:22:47 >> Backup <<
2025/08/29 22:29:24 >> Backup <<
2025/08/29 22:29:24 >> Backup <<
2025/09/01 15:44:08 >> Backup <<
2025/09/01 15:44:08 >> Backup <<
2025/09/01 20:02:12 >> Backup <<
2025/09/01 20:02:12 >> Backup <<
2025/09/03 07:01:23 >> Backup <<
2025/09/03 07:01:23 >> Backup <<
2025/09/04 06:52:20 >> Backup <<
2025/09/04 06:52:20 >> Backup <<
2025/09/04 15:09:19 >> Backup <<
2025/09/04 15:09:19 >> Backup <<
2025/09/05 20:30:05 >> Backup <<
2025/09/05 20:30:05 >> Backup <<
2025/09/10 18:42:50 >> Backup <<
2025/09/10 18:42:50 >> Backup <<
2025/09/10 18:59:18 >> Backup <<
2025/09/10 18:59:18 >> Backup <<
2025/09/11 19:50:38 >> Backup <<
2025/09/11 19:50:38 >> Backup <<
2025/09/11 20:03:27 >> Backup <<
2025/09/11 20:03:27 >> Backup <<
2025/09/12 09:13:49 >> Backup <<
2025/09/12 09:13:49 >> Backup <<
2025/09/16 18:52:44 >> Backup <<
2025/09/16 18:52:44 >> Backup <<
2025/09/21 08:38:30 >> Backup <<
2025/09/21 08:38:30 >> Backup <<
2025/09/27 21:43:04 >> Backup <<
2025/09/27 21:43:04 >> Backup <<
2025/09/28 19:26:49 >> Backup <<
2025/09/28 19:26:49 >> Backup <<
2025/10/03 19:24:08 >> Backup <<
2025/10/03 19:24:08 >> Backup <<
2025/10/09 07:51:18 >> Backup <<
2025/10/09 07:51:18 >> Backup <<
2025/10/11 07:51:23 >> Backup <<
2025/10/11 07:51:23 >> Backup <<
2025/10/14 20:26:45 >> Backup <<
2025/10/14 20:26:45 >> Backup <<
2025/10/14 20:27:32 >> Backup <<
2025/10/14 20:27:32 >> Backup <<
2025/10/18 08:35:09 >> Backup <<
2025/10/18 08:35:09 >> Backup <<
2025/10/23 15:35:40 >> Backup <<
2025/10/23 15:35:40 >> Backup <<
2025/11/09 14:39:39 >> Backup <<
2025/11/09 14:39:39 >> Backup <<
2025/11/11 07:54:38 >> Backup <<
2025/11/11 07:54:38 >> Backup <<
2025/11/11 16:24:46 >> Backup <<
2025/11/11 16:24:46 >> Backup <<
2025/11/11 21:44:06 >> Backup <<
2025/11/11 21:44:06 >> Backup <<
2025/11/15 10:49:39 >> Backup <<
2025/11/15 10:49:39 >> Backup <<
2025/11/15 13:52:48 >> Backup <<
2025/11/15 13:52:48 >> Backup <<
2025/11/15 22:01:08 >> Backup <<
2025/11/15 22:01:08 >> Backup <<
2025/11/21 20:46:18 >> Backup <<
2025/11/21 20:46:18 >> Backup <<
2025/11/21 21:51:08 >> Backup <<
2025/11/21 21:51:08 >> Backup <<
2025/11/24 16:41:14 >> Backup <<
2025/11/24 16:41:14 >> Backup <<
2025/11/26 07:32:54 >> Backup <<
2025/11/26 07:32:54 >> Backup <<
2025/11/28 15:40:07 >> Backup <<
2025/11/28 15:40:07 >> Backup <<
2025/12/03 18:36:05 >> Backup <<
2025/12/03 18:36:05 >> Backup <<
2025/12/24 16:24:44 >> Backup <<
2025/12/24 16:24:44 >> Backup <<
2026/01/01 14:10:32 >> Backup <<
2026/01/01 14:10:32 >> Backup <<
2026/01/09 06:48:07 >> Restart <<
2026/01/09 06:48:07 >> Restart <<
2026/01/09 08:20:22 >> Backup <<
2026/01/09 08:20:22 >> Backup <<
2026/01/09 09:16:17 >> Backup <<
2026/01/09 09:16:17 >> Backup <<
2026/01/09 11:53:42 >> Backup <<
2026/01/09 11:53:42 >> Backup <<
2026/01/09 15:04:01 >> Backup <<
2026/01/09 15:04:01 >> Backup <<
2026/01/09 22:18:37 >> Backup <<
2026/01/09 22:18:37 >> Backup <<
2026/01/10 21:07:46 >> Backup <<
2026/01/10 21:07:46 >> Backup <<
2026/01/10 22:06:24 >> Backup <<
2026/01/10 22:06:24 >> Backup <<
2026/01/18 17:59:49 >> Backup <<
2026/01/18 17:59:49 >> Backup <<
2026/01/18 18:31:04 >> Backup <<
2026/01/18 18:31:04 >> Backup <<
2026/01/20 19:47:28 >> Test1 <<
2026/01/20 19:47:28 >> Test1 <<
2026/01/20 19:52:47 >> Backup <<
2026/01/20 19:52:47 >> Backup <<
2026/01/23 15:26:47 >> Backup <<
2026/01/23 15:26:47 >> Backup <<
2026/01/23 17:38:01 >> Backup <<
2026/01/23 17:38:01 >> Backup <<
2026/01/23 19:08:14 >> Backup <<
2026/01/23 19:08:14 >> Backup <<
2026/01/23 20:15:15 >> Backup <<
2026/01/23 20:15:15 >> Backup <<
2026/01/29 18:33:59 >> Backup <<
2026/01/29 18:33:59 >> Backup <<
2026/02/04 07:43:21 >> Backup <<
2026/02/04 07:43:21 >> Backup <<
2026/02/06 19:14:09 >> Backup <<
2026/02/06 19:14:09 >> Backup <<
2026/02/07 16:06:35 >> Restart <<
2026/02/07 16:06:35 >> Restart <<
2026/02/07 19:46:44 >> Backup <<
2026/02/07 19:46:44 >> Backup <<
2026/02/08 15:01:57 >> Backup <<
2026/02/08 15:01:57 >> Backup <<
2026/02/10 09:40:44 >> Backup <<
2026/02/10 09:40:44 >> Backup <<
2026/02/10 19:41:50 >> Backup <<
2026/02/10 19:41:50 >> Backup <<
2026/02/14 12:24:25 >> Backup <<
2026/02/14 12:24:25 >> Backup <<
2026/02/20 15:37:50 >> Backup <<
2026/02/20 15:37:50 >> Backup <<
2026/02/21 10:56:04 >> Backup <<
2026/02/21 10:56:04 >> Backup <<
2026/02/21 13:44:58 >> Backup <<
2026/02/21 13:44:58 >> Backup <<
2026/03/01 12:01:03 >> Backup <<
2026/03/01 12:01:03 >> Backup <<
2026/03/02 18:41:06 >> Backup <<
2026/03/02 18:41:06 >> Backup <<
2026/03/02 18:51:56 >> Backup <<
2026/03/02 18:51:56 >> Backup <<
2026/03/04 06:36:26 >> Backup <<
2026/03/04 06:36:26 >> Backup <<
2026/03/04 06:40:41 >> Backup <<
2026/03/04 06:40:41 >> Backup <<
2026/03/12 17:07:55 >> Backup <<
2026/03/12 17:07:55 >> Backup <<
2026/03/27 07:52:06 >> Backup <<
2026/03/27 07:52:06 >> Backup <<
2026/03/28 12:47:34 >> Backup <<
2026/03/28 12:47:34 >> Backup <<
2026/04/01 07:32:41 >> Backup <<
2026/04/01 07:32:41 >> Backup <<
2026/04/01 12:29:41 >> Backup <<
2026/04/01 12:29:41 >> Backup <<
2026/04/02 07:12:53 >> Backup <<
2026/04/02 07:12:53 >> Backup <<
2026/04/06 10:25:22 >> Backup <<
2026/04/06 10:25:22 >> Backup <<
2026/04/08 06:52:30 >> Restart <<
2026/04/08 06:52:30 >> Restart <<
2026/04/08 07:48:53 >> Backup <<
2026/04/08 07:48:53 >> Backup <<
2026/04/13 06:54:21 >> Backup <<
2026/04/13 06:54:21 >> Backup <<
2026/04/13 19:23:20 >> Backup <<
2026/04/13 19:23:20 >> Backup <<
2026/04/15 06:34:39 >> Restart <<
2026/04/15 06:34:39 >> Restart <<
2026/04/15 07:23:49 >> Backup <<
2026/04/15 07:23:49 >> Backup <<
2026/04/15 08:16:06 >> Backup <<
2026/04/15 08:16:06 >> Backup <<
2026/04/23 20:48:45 >> Backup <<
2026/04/23 20:48:45 >> Backup <<
2026/04/28 09:31:20 >> Backup <<
2026/04/28 09:31:20 >> Backup <<
2026/04/28 13:50:22 >> Backup <<
2026/04/28 13:50:22 >> Backup <<
2026/05/01 07:58:47 >> Backup <<
2026/05/01 07:58:47 >> Backup <<
2026/05/04 06:19:01 >> Backup <<
2026/05/04 06:19:01 >> Backup <<
2026/05/04 06:27:54 >> Backup <<
2026/05/04 06:27:54 >> Backup <<
2026/05/04 07:20:20 >> Backup <<
2026/05/04 07:20:20 >> Backup <<
2026/05/06 07:04:06 >> Backup <<
2026/05/06 07:04:06 >> Backup <<
2026/05/08 06:12:59 >> Backup <<
2026/05/08 06:12:59 >> Backup <<
2026/05/09 06:52:03 >> Backup <<
2026/05/09 06:52:03 >> Backup <<
2026/05/16 16:57:55 >> Backup <<
2026/05/16 16:57:55 >> Backup <<
2026/05/19 20:27:31 >> Backup <<
2026/05/19 20:27:31 >> Backup <<
2026/05/21 20:59:50 >> Backup <<
2026/05/21 20:59:50 >> Backup <<
2026/05/21 21:02:01 >> Backup <<
2026/05/21 21:02:01 >> Backup <<
2026/05/22 06:03:58 >> Backup <<
2026/05/22 06:03:58 >> Backup <<
2026/05/23 17:14:01 >> Backup <<
2026/05/23 17:14:01 >> Backup <<
2026/05/24 17:27:50 >> Backup <<
2026/05/24 17:27:50 >> Backup <<
2026/05/27 06:42:10 >> Backup <<
2026/05/27 06:42:10 >> Backup <<
2026/05/27 06:59:52 >> Backup <<
2026/05/27 06:59:52 >> Backup <<
2026/05/27 07:22:26 >> Backup <<
2026/05/27 07:22:26 >> Backup <<
2026/05/28 19:22:27 >> Backup <<
2026/05/28 19:22:27 >> Backup <<
2026/05/30 10:16:50 >> Backup <<
2026/05/30 10:16:50 >> Backup <<
2026/05/30 17:43:26 >> Backup <<
2026/05/30 17:43:26 >> Backup <<
2026/05/31 11:15:25 >> Backup <<
2026/05/31 11:15:25 >> Backup <<
2026/05/31 13:19:32 >> Backup <<
2026/05/31 13:19:32 >> Backup <<
2026/05/31 15:45:54 >> Backup <<
2026/05/31 15:45:54 >> Backup <<
2026/05/31 16:54:52 >> Backup <<
2026/05/31 16:54:52 >> Backup <<
2026/06/01 16:53:57 >> Backup <<
2026/06/01 16:53:57 >> Backup <<
2026/06/01 22:09:14 >> Backup <<
2026/06/01 22:09:14 >> Backup <<
2026/06/02 12:17:03 >> Backup <<
2026/06/02 12:17:03 >> Backup <<
2026/06/02 12:41:12 >> Backup <<
2026/06/02 12:41:12 >> Backup <<
2026/06/05 17:46:21 >> Backup <<
2026/06/05 17:46:21 >> Backup <<
2026/06/05 19:14:29 >> Backup <<
2026/06/05 19:14:29 >> Backup <<
2026/06/05 20:30:03 >> Backup <<
2026/06/05 20:30:03 >> Backup <<
2026/06/09 07:42:31 >> Backup <<
2026/06/09 07:42:31 >> Backup <<
2026/06/21 07:12:41 >> Backup <<
2026/06/21 07:12:41 >> Backup <<
2026/06/23 20:19:20 >> Backup <<
2026/06/23 20:19:20 >> Backup <<
2026/06/25 07:34:24 >> Backup <<
2026/06/25 07:34:24 >> Backup <<
2026/06/30 08:39:32 >> Backup <<
2026/06/30 08:39:32 >> Backup <<
2026/07/03 13:12:03 >> Backup <<
2026/07/03 13:12:03 >> Backup <<
2026/07/03 18:17:35 >> Backup <<
2026/07/03 18:17:35 >> Backup <<
2026/07/03 18:50:56 >> Backup <<
2026/07/03 18:50:56 >> Backup <<
2026/07/04 09:27:49 >> Backup <<
2026/07/04 09:27:49 >> Backup <<
2026/07/06 09:01:01 >> Backup <<
2026/07/06 09:01:01 >> Backup <<
2026/07/06 09:27:17 >> Backup <<
2026/07/06 09:27:17 >> Backup <<
2026/07/06 10:27:26 >> Backup <<
2026/07/06 10:27:26 >> Backup <<
2026/07/07 11:14:56 >> Restart <<
2026/07/07 11:14:56 >> Restart <<
2026/07/07 14:18:18 >> Backup <<
2026/07/07 14:18:18 >> Backup <<
2026/07/14 19:53:17 >> Backup <<
2026/07/14 19:53:17 >> Backup <<
2026/07/14 20:13:16 >> Backup <<
2026/07/14 20:13:16 >> Backup <<
2026/07/15 16:27:52 >> Backup <<
2026/07/15 16:27:52 >> Backup <<
2026/07/15 17:23:47 >> Backup <<
2026/07/15 17:23:47 >> Backup <<
2026/07/16 08:14:36 >> Backup <<
2026/07/16 08:14:36 >> Backup <<
2026/07/16 13:54:31 >> Backup <<
2026/07/16 13:54:31 >> Backup <<
2026/07/16 14:08:05 >> Backup <<
2026/07/16 14:08:05 >> Backup <<
2026/07/21 12:55:03 >> Backup <<
2026/07/21 12:55:03 >> Backup <<
2026/07/21 13:39:14 >> Backup <<
2026/07/21 13:39:14 >> Backup <<
2026/07/21 18:06:15 >> Backup <<
2026/07/21 18:06:15 >> Backup <<
2026/07/28 18:49:52 >> Backup <<
2026/07/28 18:49:52 >> Backup <<
2026/07/29 10:06:20 >> Backup <<
2026/07/29 10:06:20 >> Backup <<
2026/07/31 11:20:52 >> Backup <<
2026/07/31 11:20:52 >> Backup <<
2026/07/31 16:59:35 >> Backup <<
2026/07/31 16:59:35 >> Backup <<
2026/08/18 10:05:58 >> Backup <<
2026/08/18 10:05:58 >> Backup <<
2026/08/29 08:59:56 >> Backup <<
2026/08/29 08:59:56 >> Backup <<
2026/08/29 09:38:58 >> Backup <<
2026/08/29 09:38:58 >> Backup <<
2026/08/31 11:18:27 >> Test1 <<
2026/08/31 11:18:27 >> Test1 <<
2026/08/31 11:21:30 >> Test2 <<
2026/08/31 11:21:30 >> Test2 <<
2026/08/31 11:36:44 >> Test2 <<
2026/08/31 11:36:44 >> Test2 <<
2026/08/31 12:05:11 >> Test2 <<
2026/08/31 12:05:11 >> Test2 <<
2026/08/31 12:07:31 >> Test2 <<
2026/08/31 12:07:31 >> Test2 <<
2026/08/31 12:08:43 >> Test2 <<
2026/08/31 12:08:43 >> Test2 <<
2026/08/31 12:09:47 >> Test2 <<
2026/08/31 12:09:47 >> Test2 <<
2026/08/31 12:50:30 >> Test2 <<
2026/08/31 12:50:30 >> Test2 <<
2026/08/31 12:54:41 >> Backup <<
2026/08/31 12:54:41 >> Backup <<
2026/08/31 14:28:46 >> Test2 <<
2026/08/31 14:28:46 >> Test2 <<
2026/08/31 14:35:45 >> Test1 <<
2026/08/31 14:35:45 >> Test1 <<
2026/08/31 14:56:15 >> Test1 <<
2026/08/31 14:56:15 >> Test1 <<
2026/08/31 14:56:56 >> Test2 <<
2026/08/31 14:56:56 >> Test2 <<
2026/08/31 15:03:59 >> Test2 <<
2026/08/31 15:03:59 >> Test2 <<
2026/08/31 15:09:36 >> Test2 <<
2026/08/31 15:09:36 >> Test2 <<
2026/08/31 15:24:40 >> Backup <<
2026/08/31 15:24:40 >> Backup <<
2026/08/31 15:31:41 >> Test1 <<
2026/08/31 15:31:41 >> Test1 <<
2026/08/31 15:54:34 >> Test1 <<
2026/08/31 15:54:34 >> Test1 <<
2026/08/31 16:31:02 >> Test1 <<
2026/08/31 16:31:02 >> Test1 <<
2026/08/31 16:36:27 >> Test1 <<
2026/08/31 16:36:27 >> Test1 <<
2026/08/31 16:54:20 >> Test1 <<
2026/08/31 16:54:20 >> Test1 <<
2026/08/31 17:13:09 >> Test1 <<
2026/08/31 17:13:09 >> Test1 <<
2026/08/31 17:28:53 >> Test1 <<
2026/08/31 17:28:53 >> Test1 <<
2026/08/31 17:30:26 >> Test1 <<
2026/08/31 17:30:26 >> Test1 <<
2026/08/31 17:51:39 >> Test1 <<
2026/08/31 17:51:39 >> Test1 <<
2026/08/31 18:18:32 >> Backup <<
2026/08/31 18:18:32 >> Backup <<
2026/09/14 16:11:32 >> Test2 <<
2026/09/14 16:11:32 >> Test2 <<

```

So it hasn't been rebooted/reset/shutdown for more than a year.

---

<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:** [20 September 2026 12:44 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/30 "2026-09-20T12:44:08Z")

</div>

> [@jbudd](#):
>
> These are all using a swap file,

How can you tell whether it is swap file or using some of the system RAM for swap?

---

<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:** [20 September 2026 12:45 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/31 "2026-09-20T12:45:47Z")

</div>

> [@Trying\_to\_learn](#):
>
> Do you want the correct memory usage shots then?

Did you look at those? Did you see anything unexpected related to CPU time?

---

<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:** [20 September 2026 12:56 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/32 "2026-09-20T12:56:16Z")

</div>

> [@jbudd](#):
>
> TimePi is using 100% of available swap space.

Yes, it is, but now there is plenty of available memory, which means that at some point it filled up the swap, but it survived and now is ok. It is probably fairly recent though as one would expect the swap to be slowly released.

> [@jbudd](#):
>
> Zero [file based] swapping is what you should see on a healthy system,

I think that a small amount of swap usage is perfectly acceptable, and in fact can be a good thing, it just means that the system has swapped out some rarely used pages in order to make better use of the space with, for example, the disc cache, so speeding up file operations.

---

<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:** [20 September 2026 13:12 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/33 "2026-09-20T13:12:16Z")

</div>

As has been previously said on the forum, the use of SWAP on a Pi has a number of impacts:

1. The recommendation on modern versions of Linux is _not_ to disable SWAP but to minimise its use - On a Pi using SD-Cards, storage I/O is slow so excessive swapping makes everything that is being swapped slow. This can have knock-on impacts due to transaction overheads. Meaning that the slow I/O can increase both CPU and memory usage.
2. The impact of SWAP on the life of an SD-Card is dependent on the card. Cheap cards will wear out quickly with excessive swap (and log and DB writing) activity. A good card that has wear levelling and has lots of spare capacity may be minimally impacted and should easily last 3-5 years or more of very heavy use. This is born out by my personal use of Samsung EVO and EVO Pro 32GB cards with several Pi's over many years.

If you have a server that has memory constraints, the GUI is the first thing you should get rid of. There are plenty of Linux tools that can help you avoid running a Linux desktop. Even on my laptop-based home server (with 8GB RAM), I don't run a desktop. However, I do keep a Docker container around that will serve up a VNC desktop should I ever need one, I just keep it turned off unless I really need it.

---

<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:** [20 September 2026 13:21 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/34 "2026-09-20T13:21:05Z")

</div>

I agree with all of that. However, I believe the use of a some swap is not a problem provided it is not being actively swapped in and out. Provided that the Avail Mem (in top) is a good percentage of the total memory then there is usually nothing to worry about. For example, my 1GB pi 3 has 512MB swap configured, and 84 of that is used, but the Avail Mem is 660, so there is no problem.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [20 September 2026 14:33 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/35 "2026-09-20T14:33:44Z")

</div>

> [@TotallyInformation](#):
>
> If you have a server that has memory constraints, the GUI is the first thing you should get rid of.

Yes. First step.

> [@TotallyInformation](#):
>
> 1. The recommendation on modern versions of Linux is _not_ to disable SWAP but to minimise its use - On a Pi using SD-Cards, storage I/O is slow so excessive swapping makes everything that is being swapped slow.

Well yes. But.  
On an up-to-date PiOS (Trixie), zram memory based swapping is implemented. Since a memory resident swap "partition" is fast, the OS will use swap space much more readily. Zero swap usage is no longer likely or even desirable.

If Andrew could migrate these Pies to Trixie lite I think he would get more efficient memory management.  
Second best, as I see it, is to install zram, see [https://pimylifeup.com/raspberry-pi-zram/](https://pimylifeup.com/raspberry-pi-zram/) for details.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [20 September 2026 19:09 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/36 "2026-09-20T19:09:08Z")

</div>

Not sure if this might help you, but I also had a memory leak on my Pi 3 once.

I spent quite a lot of time investigating what was causing it and eventually came to the conclusion that it was caused by a combination of Kevin’s Mp4frag node and the Pi’s low-voltage detection.

As soon as low-voltage detection was triggered on the Pi (and that happens more often than you might think), the CPU frequency of the Pi is reduced and all kinds of things get pushed onto the stack. When the low-voltage condition disappears, all kinds of things are popped from the stack again, and that’s where something went wrong. The stack wasn’t being properly freed.

As I mentioned earlier, I spent quite a lot of time trying to isolate the problem so I could raise an issue somewhere, but I wasn’t able to determine the exact cause.  
I couldn’t figure out whether the problem was with Kevin’s node, the underlying FFmpeg, Node.js, or the Pi OS. If tested on a fresh Pi with Node-RED and Mp4frag, and the problem was reproducible.

I’ve been running Node-RED on an Odroid C4 with an eMMC module for quite some time now, and the problem hasn’t occurred there.  
The Odroid has a proper power supply rather than the poorly designed USB power supply used with the RPi. Low-voltage detection simply isn’t something we encounter on the Odroid.

Long story short, definitely take a look at your hardware as well, especially the power supply.

Keep an eye on the red LED on your Pi. It should remain constantly lit, indicating that your power supply is providing enough power.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [20 September 2026 19:30 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/37 "2026-09-20T19:30:31Z")

</div>

> [@edje11](#):
>
> As soon as low-voltage detection was triggered on the Pi (and that happens more often than you might think)

There is a command vcgencmd get\_throttled which will return a hex value.  
eg

```auto
pi@AlsoPi:~ $ vcgencmd get_throttled
throttled=0x0

```

If it returns zero, as above, the Pi CPU has not been throttled since it was last booted.  
A non-zero value indicates it has been throttled, which could be temperature related, low voltage, probably other causes.

Since @Trying_to_learn has Pies with uptime measured in years, it's easy enough for him to check.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 20:47 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/38 "2026-09-20T20:47:08Z")

</div>

Well, overnight the total memory use is at `49%` - which is good compared to the trend after initial reboot.

Thanks @edje11. Interesting point.  
**(VERY)**

TLDR  
A few years back I was just setting up all 3 machines and went skint on the PSUs.  
As they were to be on 24/7 I got/used those power boards with a USB port on them to power the Pies.

Things seemed ok, but nearly daily my MQTT device would be in the wrong state.  
I never knew if it was the broker or the machine sending the message.

But it became intolerable.

I swapped the _cheap_ USB port supplies with RasPi ones: voila! All good.

So, yeah. I get the importance of the power supply.

On that:  
and I admit now, it wasn't working as expected THEN.  
But now I hope it is.

I wrote a whole _flow_ for machine health.

 ![Screenshot from 2026-09-21 06-32-49](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b648da75e9b41b87765dec56211c5d2b5b15a21e.jpeg)

At about every 20 seconds I run commands - like the one mentioned - to check nothing has happened, and if it has, to indicate it.

WORST case I've had is overheating/soft temp limit.

The _red led_.  
Mia culpa.  
OCD sucks.

I turn it off after a short time after a boot.  
Well, not exactly.

On boot, a script runs that blinks the LED at a moderate rate - indicating it has rebooted.  
I then click a button and it turns the LED off.

I may have ffmpg installed/running. Not sure.  
That is interesting.  
I'll look into that a bit more.

Nothing else exciting to report at this stage.

Thanks.

---

<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:** [20 September 2026 20:51 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/39 "2026-09-20T20:51:15Z")

</div>

I don't think we have seen any evidence yet that node-red _is_ leaking memory, or did I miss it?

The reason that timepi is using a lot of memory is probably related to the fact that omxplayer is hogging one of the cores. @Trying_to_learn, is node-red driving omxplayer? Do you know why it is locked up?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [20 September 2026 20:55 UTC](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806/40 "2026-09-20T20:55:20Z")

</div>

Yes, NR is using omxplayer.

It is used for voice output.

Have no idea why it is locked up.

And - just for clarity: it is TelePi that has the _problem_.

But thanks for the catch.

I've noticed - recently - that TimePi has gone from the normal/nominal \<15% CPU load to 20+%  
So that may be the reason.

[Previous page](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806.md?page=1)

[Next page](https://discourse.nodered.org/t/how-would-i-find-a-memory-leak/101806.md?page=3)
