Debug node causing RangeError: Maximum call stack size exceeded

I've implemented the log on a file just for debug purposes after the NR restart happened. I really don't know if I will be able to get/see te errors cathed by the catch node..I hope so in order to understand the NR restart cause :slight_smile:

If it happens to be connectivity related, maybe you can "speed things up" by disconnecting the Pi's ethernet/wifi?

Unfortunately the radnom restart happend again but I didn't find any writing in the log file I've created.
The strange think is that the error in the syslog is always the same but I didn't get any entry in my personal log file. If - in the syslog file, the debug node throws an error saying that that it received a large number of message that it cannot manage (if I've understood what is behind the error message) I cannot really understand why another node connected to the same "catch" node and taht writes on a local file didn't wrute anything on that file..

Jun 6 15:17:58 raspberrypi Node-RED[10142]: 6 Jun 15:17:58 - [warn] [debug:Errori rilevati sul flow CAMPIONAMENTO SENSORI] Message exceeded maximum number of catches
Jun 6 15:17:58 raspberrypi Node-RED[10142]: 6 Jun 15:17:58 - [error] [debug:Errori rilevati sul flow CAMPIONAMENTO SENSORI] RangeError: Maximum call stack size exceeded

I'm surely missing something....Any clues?

It's difficult to say anything without knowing how you have set the logging up / without seeing your flow. Could you export and share it? Read this first if you haven't yet:

Unfortunately, the node that writes on a local file is located in another tab so I cannot share the json flow file. Anyway I've now put a delay node (configure as a "rate limit") between the catch node and the debug node (that throws me the "maximum call stack size exceeded" error).
I can share the json file of this new configuration (that is really basic).

[{"id":"2759c1fb.04553e","type":"debug","z":"a6dfd68e.7bd928","name":"Errori rilevati sul flow CAMPIONAMENTO SENSORI","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"error","x":1380,"y":140,"wires":[]},{"id":"57c5d207.5f6c6c","type":"catch","z":"a6dfd68e.7bd928","name":"Errrori rilevati dal flow \"CAMPIONAMENTO SENSORI\"","scope":null,"x":668.3333740234375,"y":138.33334350585938,"wires":[["26e607ac.208b58"]]},{"id":"26e607ac.208b58","type":"delay","z":"a6dfd68e.7bd928","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":990,"y":140,"wires":[["2759c1fb.04553e","eb0b8bf0.dc641"]]}]

In this way any message collected by the catch node will be slow down and go to the debug node at a rate of 1 msg every second.

I'll leave it in test for some day and see it this fix the error.

I checked your flow. Nothing much to see there but you probably want to check also "system log" in the debug node after the catch node. Otherwise it'll just catch the errors for display on the Node-RED editor and you'll miss them again.

I don't get your point. What exactly do yu mean with "system log"? Do you refer to the syslog? After the "debug" node I don't have anything.... :roll_eyes:

In the edit dialog of the debug node in your flow. Add a checkmark to "system log". I'd take a screenshot unless I was on mobile. Otherwise the messages it receives from the catch node are only displayed in the sidebar debug tab.

Ah ok I understood. I've configure the debug mode as you suggested. Thanks for your advice