Description
Memory Leak Case
There is Memory leak problem in both of your newest version 0.7.3 and prior version 0.3.3.
The testing flow was that you mentioned in the previous issue,
but I changed the input more quick, For example, 7200pcs / 5 seconds, and change the delay node to 10msg/s
(My work space need the input more large and more fast)
In this case, after running node-red around 1.5hours, the memory usage in node-red from 4% to 40%, and then node-red crashed.
Crashed again no matter how much times node-red restart.
Problem Solved after I modified your code, and very pleasure to improve your code.
However, I changed lots of your version 0.3.3 code, and actually there is no memory leak again, the problem is solving.
I am pleasure to help you to improve your code or maybe you can merge my code, but first I have couples of questions for you:
-
First of all, why did you use the module mustache and others for the MS-SQL configuration input? After I saw the page of module mustache page, I found that was major use for HTML template, am I correct? Therefore, I tried to delete it all in the red frame of picture (as shown below), I found the output that was no difference to your origin code. Here is your version 0.3.3 code:
Could you simply explain me what you were doing here? -
Second, I noticed that you create new promise object for every node-mssql input, I am not sure whether the node-red use the cahch for every node. If yes, I guess that was very big problem. Why did you create a new promise object to include node-mssql promise object?
After I deleted these two point, and modified the code, the memory leak was never happen again even thought I set the input 9700 msg / 2 seconds, and total input 70 million messages.
Please help me, thanks.