That usually means that you are not able to process messages at the speed they are coming in. I think you need to give us a bit more information about what your flow consists of. Also, which network are you talking about? Are you getting modbus data faster than you are able to process it?
We have a linux machine where Node-red is running and it connects to Modbus TCP devices.
The linux machine we can see many reconnect attempt in netstat .
Seems NR hold the handles to these and it takes more and more memory .
When we restart NR everything is fine for some time .
I the devices are not connecting quickly or bad network ,memory leak is quite fast .
'modbus-client is used in NR with timeout 3000 and Reconnect 5000.
The chances are that the issue is in the contrib node you are using. Have you opened an issue on the nodes github page to highlight your findings to the nodes author?
After deep investigation ,we found out that memory leak happens only when there is a bad TCP connectivity .Seems request to connect get accumulated and finally node-red fails.
If there is no connection issue everything is fine.
Will check with author too.
The node normally connect to modbus and connectivity is correct everything works.
But if TCP connection fails ,we still push messges to the node and it try for connection .
Multiples tries accumulate memory .It does not forget old try I believe.
Are you waiting for it to tell you that it has failed or succeeded before sending the next request? Or do you think it is that it does not release some memory when it fails?
I am not waiting for it to tell ,my intention is if connection succeed the message has to go .
If connection fails ,it should forget the previous try when we try to connect again.
I've stripped down my logic to only poll the device (digital out only) to read the states after there's been a change (plus a few extra times for latency/double checks).