# Auto start corresponding to "node-red-pi --max-old-space-size=256"

**URL:** https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687
**Category:** General
**Created:** [27 July 2022 10:45 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687 "2022-07-27T10:45:43Z")
**Posts on this page:** 10
**Page:** 2

<div class="post-metadata">

### Author: ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)
#### Post date: [27 July 2022 18:33 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/21 "2022-07-27T18:33:14Z")

</div>

IF you are running a RaspberryPi4B w/ 4GB or 8GB of RAM, is it really necessary to place this limits on Node-RED?

---

<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: [27 July 2022 18:55 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/22 "2022-07-27T18:55:43Z")

</div>

No. And it doesn't do what most people think anyway. All it does is suggest when node.js should commence garbage collection, you cannot really change the amount of memory that node.js actually uses. Generally, current versions of node.js are excellent at managing memory.

In this example, the heap was used up before nr even really got going by the looks of the log so there is some other issue. We need the OP to share the data I asked for.

---

<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: [27 July 2022 20:58 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/23 "2022-07-27T20:58:53Z")

</div>

@Jeff2 also post the contents of /lib/systemd/system/nodered.service please.

---

<div class="post-metadata">

### Author: ![Jeff2](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@Jeff2](https://discourse.nodered.org/u/Jeff2)
#### Post date: [29 July 2022 11:56 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/24 "2022-07-29T11:56:22Z")

</div>

Hi,

Thanks and sorry for late feedback, I was travelling for work...

node-red

29 Jul 13:55:28 - [info]

# Welcome to Node-RED

29 Jul 13:55:28 - [info] Node-RED version: v3.0.1  
29 Jul 13:55:28 - [info] Node.js version: v16.16.0  
29 Jul 13:55:28 - [info] Linux 5.15.32-v7l+ arm LE  
29 Jul 13:55:29 - [info] Loading palette nodes  
29 Jul 13:55:31 - [info] Settings file : /home/jeff/.node-red/settings.js  
29 Jul 13:55:31 - [info] Context store : 'default' [module=memory]  
29 Jul 13:55:31 - [info] User directory : /home/jeff/.node-red  
29 Jul 13:55:31 - [warn] Projects disabled : editorTheme.projects.enabled=false  
29 Jul 13:55:31 - [info] Flows file : /home/jeff/.node-red/flows.json  
29 Jul 13:55:31 - [info] Creating new flow file  
29 Jul 13:55:31 - [warn] Encrypted credentials not found  
29 Jul 13:55:31 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
29 Jul 13:55:31 - [info] Starting flows  
29 Jul 13:55:31 - [info] Started flows

---

<div class="post-metadata">

### Author: ![Jeff2](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@Jeff2](https://discourse.nodered.org/u/Jeff2)
#### Post date: [29 July 2022 11:57 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/25 "2022-07-29T11:57:25Z")

</div>

Here is the answer to node -v command:

v16.16.0

---

<div class="post-metadata">

### Author: ![Jeff2](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@Jeff2](https://discourse.nodered.org/u/Jeff2)
#### Post date: [29 July 2022 12:14 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/26 "2022-07-29T12:14:45Z")

</div>

sudo systemctl enable nodered.service doesn't return any error but the service doesn't start

---

<div class="post-metadata">

### Author: ![Jeff2](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@Jeff2](https://discourse.nodered.org/u/Jeff2)
#### Post date: [29 July 2022 12:20 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/27 "2022-07-29T12:20:37Z")

</div>

> [@HaroldPetersInskipp](#):
>
> Verify that these lines are present, if not then add them:

I did this (1st line was there but value was 4096) and it works now !

Many thanks for your quick support !

---

<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: [29 July 2022 12:24 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/28 "2022-07-29T12:24:54Z")

</div>

> [@Jeff2](#):
>
> sudo systemctl enable nodered.service doesn't return any error but the service doesn't start

There will be errors in the syslog if it couldn't start the service at all or in the node-red log if nr tried to start but failed. There are also other `systemctl` commands to show status and other details which may help.

However, if you are getting the out of memory error before nr really starts, you need to provide the details I asked for.

---

<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: [29 July 2022 12:49 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/29 "2022-07-29T12:49:49Z")

</div>

> [@Jeff2](#):
>
> 1st line was there but value was 4096

What type of pi (if it is a pi) are you running on, which OS and how much memory have you got?

What does the command `uname -m` report ?  
What does the command `getconf LONG_BIT` report ?  
What does the command `cat /proc/meminfo | grep MemTotal` report ?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 September 2022 12:50 UTC](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687/30 "2022-09-27T12:50:32Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/auto-start-corresponding-to-node-red-pi-max-old-space-size-256/65687.md?page=1)
