Memory leak in modbus flow

I working on a Modbus TCP flow .
When the network is slow Node-red is consuming more and more memory .

if there a chance for Queue formation in these nodes and it consumes more memory?.

What is the best way to find memory leak ?.
I took heapdump at different times ,is there any other way ?

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?