# Node Red stopped - Max call stack size exceeded

**URL:** <https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620>\
**Category:** General\
**Created:** [12 October 2019 07:15 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620 "2019-10-12T07:15:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 07:15 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/1 "2019-10-12T07:15:30Z")

</div>

Hi,  
Node-red just suddenly stopped and I can't access it anymore. I was working on a flow when this happened and not matter what I try, I cant get it to display with the :1880.  
Is there a way I can get this going as there are other flows that I don't really want to lose. Many thanks...

## pi@raspberrypi:~ $ node-red-log 12 Oct 08:06:35 - [info] Dashboard version 2.15.2 started at /ui 12 Oct 08:06:44 - [info] Settings file : /home/pi/.node-red/settings.js 12 Oct 08:06:44 - [info] Context store : 'default' [module=memory] 12 Oct 08:06:44 - [info] User directory : /home/pi/.node-red 12 Oct 08:06:44 - [warn] Projects disabled : editorTheme.projects.enabled=false 12 Oct 08:06:44 - [info] Flows file : /home/pi/.node-red/flows\_raspberrypi.json 12 Oct 08:06:44 - [info] Server now running at [https://127.0.0.1:1880/](https://127.0.0.1:1880/) 12 Oct 08:06:44 - [warn]

## Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials file will not be recoverable, you will have to delete it and re-enter your credentials. You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

12 Oct 08:06:45 - [info] Starting flows  
12 Oct 08:06:47 - [info] Started flows  
12 Oct 08:06:47 - [info] [mqtt-broker:192.168.0.75] Connected to broker: mqtt://192.168.0.75:1883  
12 Oct 08:06:47 - [info] [mqtt-broker:a6e84369.179ad] Connected to broker: mqtt://localhost:1883  
12 Oct 08:06:47 - [info] [mqtt-broker:207358c8.71b8d8] Connected to broker: mqtt://localhost:1883  
12 Oct 08:06:47 - [error] [alexa-home-conf:cf271372.5849f] Error: connect ECONNREFUSED 34.240.81.189:8883  
12 Oct 08:06:54 - [error] [bigtimer:Lounge] RangeError: Maximum call stack size exceeded  
12 Oct 08:06:54 - [error] [bigtimer:Hallway] RangeError: Maximum call stack size exceeded

---

<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:** [12 October 2019 07:19 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/2 "2019-10-12T07:19:31Z")

</div>

Start mode red with the --safe option and undo the last changes you made.  
Most likely the lounge and hallway big timer.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 07:49 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/3 "2019-10-12T07:49:00Z")

</div>

I stop node-red (node-red-stop), start it with node-red --safe and get the following from SSH terminal

I then start with the :1880 and get as far as showing the node-red top black bar and then the pi locks up and I need to do a cold reset.

Could I modify the flows\_raspberrypi.json by using the 'backup' that is in the same directory. Must be an auto backup ??

pi@raspberrypi:~ $ node-red --safe  
12 Oct 08:35:18 - [info]

# Welcome to Node-RED

12 Oct 08:35:19 - [info] Node-RED version: v0.20.5  
12 Oct 08:35:19 - [info] Node.js version: v10.15.3  
12 Oct 08:35:19 - [info] Linux 4.19.66+ arm LE  
12 Oct 08:35:23 - [info] Loading palette nodes  
12 Oct 08:35:44 - [info] Dashboard version 2.15.2 started at /ui  
12 Oct 08:35:50 - [info] Settings file : /home/pi/.node-red/settings.js  
12 Oct 08:35:50 - [info] Context store : 'default' [module=memory]  
12 Oct 08:35:50 - [info] User directory : /home/pi/.node-red  
12 Oct 08:35:50 - [warn] Projects disabled : editorTheme.projects.enabled=false  
12 Oct 08:35:50 - [info] Flows file : /home/pi/.node-red/flows\_raspberrypi.json  
12 Oct 08:35:50 - [info] Server now running at [https://127.0.0.1:1880/](https://127.0.0.1:1880/)  
12 Oct 08:35:50 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

12 Oct 08:35:51 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
12 Oct 08:35:51 - [info] Flows stopped in safe mode. Deploy to start.  
12 Oct 08:35:51 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 08:02 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/4 "2019-10-12T08:02:51Z")

</div>

Got the black bar AND the blue background screen now but still locking up??

## pi@raspberrypi:~ $ node-red-log 12 Oct 08:44:42 - [info] Server now running at [https://127.0.0.1:1880/](https://127.0.0.1:1880/) 12 Oct 08:44:42 - [warn]

## Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials file will not be recoverable, you will have to delete it and re-enter your credentials. You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

12 Oct 08:44:43 - [info] Starting flows  
12 Oct 08:44:45 - [info] Started flows  
12 Oct 08:44:45 - [info] [mqtt-broker:192.168.0.75] Connected to broker: mqtt://192.168.0.75:1883  
12 Oct 08:44:46 - [info] [mqtt-broker:a6e84369.179ad] Connected to broker: mqtt://localhost:1883  
12 Oct 08:44:46 - [info] [mqtt-broker:207358c8.71b8d8] Connected to broker: mqtt://localhost:1883  
12 Oct 08:44:46 - [error] [alexa-home-conf:cf271372.5849f] Error: connect ECONNREFUSED 34.240.81.189:8883  
12 Oct 08:44:53 - [error] [bigtimer:Lounge] RangeError: Maximum call stack size exceeded  
Stopping Node-RED graphical event wiring tool...  
nodered.service: State 'stop-sigterm' timed out. Killing.  
nodered.service: Killing process 303 (node-red) with signal SIGKILL.  
nodered.service: Main process exited, code=killed, status=9/KILL  
Stopped Node-RED graphical event wiring tool.  
nodered.service: Unit entered failed state.  
nodered.service: Failed with result 'timeout'.

---

<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:** [12 October 2019 08:23 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/5 "2019-10-12T08:23:13Z")

</div>

There still seems to be a problem with the bigtimer node. You can start it in safe mode again and then make some changes to try and fix it. When you deploy it will start the flows running and you will see if you have fixed it. I would start by disconnecting the inputs from that node. If that fixes it then instead put a debug node there and see what you are feeding it.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 08:25 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/6 "2019-10-12T08:25:36Z")

</div>

Hi Colin, thanks for your help, the trouble is I cant start it (:1880) in safe mode (node-red --safe) so I cant access any of the flows. I just get the whirling icon in the IE page??

---

<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:** [12 October 2019 08:27 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/7 "2019-10-12T08:27:55Z")

</div>

You posted it running in safe mode earlier, so I don't understand what you mean. All you have to do is to run `node-red --safe`.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 08:32 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/8 "2019-10-12T08:32:40Z")

</div>

Hi Colin, thats what I do, run it in --safe mode. After it starts in safe mode, i try to start the flows from a browser using :1880 (which is how I normally start it) and nothing happens. The furthest its gone is to display the black bar at the top with the node-red logo and the blue backdrop screen.??

---

<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:** [12 October 2019 08:36 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/9 "2019-10-12T08:36:01Z")

</div>

Copy/paste what you see in the terminal from `node-red --safe` up to where you attempt to connect from the browser.  
Make sure you refresh the browser rather than just opening it.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 08:49 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/10 "2019-10-12T08:49:20Z")

</div>

pi@raspberrypi:~ $ node-red --safe  
12 Oct 08:35:18 - [info]

# Welcome to Node-RED

12 Oct 08:35:19 - [info] Node-RED version: v0.20.5  
12 Oct 08:35:19 - [info] Node.js version: v10.15.3  
12 Oct 08:35:19 - [info] Linux 4.19.66+ arm LE  
12 Oct 08:35:23 - [info] Loading palette nodes  
12 Oct 08:35:44 - [info] Dashboard version 2.15.2 started at /ui  
12 Oct 08:35:50 - [info] Settings file : /home/pi/.node-red/settings.js  
12 Oct 08:35:50 - [info] Context store : 'default' [module=memory]  
12 Oct 08:35:50 - [info] User directory : /home/pi/.node-red  
12 Oct 08:35:50 - [warn] Projects disabled : editorTheme.projects.enabled=false  
12 Oct 08:35:50 - [info] Flows file : /home/pi/.node-red/flows\_raspberrypi.json  
12 Oct 08:35:50 - [info] Server now running at [https://127.0.0.1:1880/](https://127.0.0.1:1880/)  
12 Oct 08:35:50 - [warn]

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in

your settings file. Node-RED will then re-encrypt your credentials  
file using your chosen key the next time you deploy a change.

12 Oct 08:35:51 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
12 Oct 08:35:51 - [info] Flows stopped in safe mode. Deploy to start.  
12 Oct 08:35:51 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 October 2019 09:00 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/11 "2019-10-12T09:00:32Z")

</div>

Now you are running in safe mode  
What do you see when you access node-red in your browser?

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 09:11 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/12 "2019-10-12T09:11:21Z")

</div>

Hi Colin,  
It displays the black bar at the top with the node-red logo and the blue backdrop screen. The browser tab icon just keeps whirling and the pi locks up.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 09:14 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/13 "2019-10-12T09:14:41Z")

</div>

Sorry, I meant the pointer icon keeps whirling. The light blue background screen is completely blank...

---

<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:** [12 October 2019 09:30 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/14 "2019-10-12T09:30:00Z")

</div>

You aren't trying to access the dashboard ui are you? You should be going to [http://whatever:1880](http://whatever:1880)  
Is the terminal still showing what it was before, that is:

> [@Thewaver](#):
>
> 12 Oct 08:35:51 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> 12 Oct 08:35:51 - [info] Flows stopped in safe mode. Deploy to start.  
> 12 Oct 08:35:51 - [info] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

and nothing else?  
Can you do a screenshot showing what you are seeing?  
Also have a look in the browser console and see if it is showing any errors.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 October 2019 10:24 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/15 "2019-10-12T10:24:44Z")

</div>

So if that’s not working.

cd to your .node-red directory and rename your flows.json file.

Restart Node-RED (this will recreate a blank flows file)  
Make sure you upgrade the big timer node to the latest version.  
The import your old flows file.  
Fix any issue with big timer BEFORE you hit deploy.

It would also worth contacting the author of the big timer node via his blog if you are using the latest version as an error in the nodes config shouldn’t cause Node-RED to crash.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 11:13 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/16 "2019-10-12T11:13:43Z")

</div>

Hi Ukmouse  
The renaming of the flow files worked. I'm back in but with no flows. How do i import the old flows please?? Many thanks for your help...

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 October 2019 11:18 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/17 "2019-10-12T11:18:12Z")

</div>

In the Node-RED menu

Import \> Clipboard

Select a file to import

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 11:25 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/18 "2019-10-12T11:25:52Z")

</div>

OK, you are assuming that I actually saved them, which I didn't:joy:. Is there a way to get them back from the renamed flow files ??

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [12 October 2019 11:29 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/19 "2019-10-12T11:29:48Z")

</div>

Point it at the flow file you renamed.

Alternatively there is a hidden file in that directory with the same name as the flows file  
but starting with a `.`and ending with `.backup`  
you can rename that to the name of the flows file node-red is using. That will take you back to the state of the deploy before the one that caused you issues.

---

<div class="post-metadata">

**Author:** ![Thewaver](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thewaver/32/11917_2.png) [@Thewaver](https://discourse.nodered.org/u/Thewaver)\
**Post date:** [12 October 2019 11:41 UTC](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620/20 "2019-10-12T11:41:01Z")

</div>

Your are a genius, all back now to how it was. Trying to get hold of Peter Scargill (bigtimer) but his web address not working.

Thanks to you (UKmouse) and others who helped me solve this problem, really appreciated...

[Next page](https://discourse.nodered.org/t/node-red-stopped-max-call-stack-size-exceeded/16620.md?page=2)
