# Node red crashes after ~1h "heap out of memory"

**URL:** <https://discourse.nodered.org/t/node-red-crashes-after-1h-heap-out-of-memory/98274>\
**Category:** General\
**Created:** [23 July 2025 15:16 UTC](https://discourse.nodered.org/t/node-red-crashes-after-1h-heap-out-of-memory/98274 "2025-07-23T15:16:20Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 July 2025 09:23 UTC](https://discourse.nodered.org/t/node-red-crashes-after-1h-heap-out-of-memory/98274/10 "2025-07-24T09:23:53Z")

</div>

> [@Desmond-Zeh](#):
>
> It is possible to write a code that checks if my node red is running or not and then start it if not already running

Run it as a service and it will auto restart.

> [@Run on windows as service](https://discourse.nodered.org/t/run-on-windows-as-service/13569/2):
>
> Yes. Running Node-RED as a service on Windows using NSSM ... Running Node Red in Windows - General - Node-RED Forum Running on windows server 2012 r2 - General - Node-RED ... [https://nodered.org/docs/faq/starting-node-red-on-boot](https://nodered.org/docs/faq/starting-node-red-on-boot) Starting Node-RED on boot : Node-RED

NOTE: This is not addressing the real problem.

> [@Desmond-Zeh](#):
>
> It usually crashes after an hour of running. It pull data from control modules per second, process and save them to the sql database

You are probably creating backpressure which is exhausting memory. Unless you share more details (like flows and details of what is happening when) it will be hard to advise the correct approach

---

_[View the full topic](https://discourse.nodered.org/t/node-red-crashes-after-1h-heap-out-of-memory/98274)._
