RangeError: Maximum call stack size exceeded

Hello,

How can I fix this?

RangeError: Maximum call stack size exceeded
at ClientSessionImpl.isChannelValid (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1544:26)
at ClientSessionImpl._performMessageTransaction (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1646:19)
at ClientSessionImpl.processTransactionQueue (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1612:14)
at C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1632:22
at ClientSessionImpl._performMessageTransaction (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1651:20)
at ClientSessionImpl.processTransactionQueue (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1612:14)
at C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1632:22
at ClientSessionImpl._performMessageTransaction (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1651:20)
at ClientSessionImpl.processTransactionQueue (C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1612:14)
at C:\Users\MEPP_IBA\node_modules\node-red-contrib-iiot-opcua\node_modules\node-opcua-client\source\private\client_session_impl.ts:1632:22

Start node-red in safe mode, undo your last change, deploy.

node-red --safe

it doesn't work. Still same problem.

What doesn't work. Safe mode? Or undoing your previous changes? deploying?

Please be more explicit & provide details.

I tried with safe mode than I made undoing previous changes. Deploying working. But I'm facing still same problem

Sorry. That is still not clear.

Are you saying: " safe mode allowed you to get Node-RED running but it crashed after deploying changes".

I suggest that you disable parts of your flows until you get to a point where node red runs. E.g start up in safe mode. Disable some nodes deploy, did it crash? Repeat that until you find which nodes are crashing it.

I want to run totaly 8 node. But now Its running to 1,2,3,4,5 nodes same time. If I run the node 6 or node 7 or node 8 at same time ,happening crashing. You can see below image.

How often, how quickly are you calling those opcua nodes ? And what are you doing in each set of templates. If you are hitting them too fast they may be backing up data in memory and causing the crash

I'm calling each nodes 5s. Aproxmitly there are 400 tags and I want to add more. I'm taking tags from kepserver(temperature,pressuare,lenght,width etc.) than I showing them. Maybe I have to increase maximum-call-stack limit but I dont know how?

Instead of reading, you might be better off subscribing.

If you must read, then you need to take into consideration the amount of time it takes to process hundreds of tags. So stagger requests or wire things in series to avoid all 400 being requested at once.

Lastly, could you bypass kepserver and go directly to the device? You might have more lick avoiding opcua

Oh one more - do you REALLY need that many tags? If yes, then you might need to rearrange the tags into arrays of data and minimise the number of tags

How can I do subscribing?

I cannot bypass kepserver because there are alot of PLC. I cannot read tags from each PLC.

How can I increase maximum-call-stack limit?

The node has built in examples. ctrl-iexamples

Dont. Just be more responsible on your polling and the amounf of data you request (i.e. access data in arrays and/or time gap your requests etc)

Usually in such cases increasing the limit would not help, it would just delay the error a little. Usually the cause is that the stack is continually building up as the system is not able to keep up with demands. As Steve says, the solution is to change the strategy.

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