Since I'm experimenting quite a lot with audio and video in Node-RED, I have to be cautious all the time that I don't store audio/video chunks somewhere in memory. Indeed I have very few memory on my Raspberry, so I need to use it with caution. Nodes like rbe/delay/... are quite memory-consuming when using this kind of data. Especially when these nodes are used 'topic-dependent'. From this discussion last night, I see that I'm not the only one struggling with this kind of problems...
I have now an experiment with cameras that works well, and after 10 minutes suddenly an out-of-memory and my raspberry goes down. Don't have clue what is going wrong. Would be nice if there was some way in Node-RED to follow up memory (e.g. on node-basis), to make troubleshooting a lot easier.
I don't think this is currently available, but if I am mistaken please correct me!!!! Can anybody give me some ideas how to handle this best?
- In my use case, a visual approach (e.g. somewhere in the flow editor) might help. E.g. in a side-panel or in the context store panel, or on the node itself, or the info panel...
- But it should be nice if I could log the memory usage somewhere in a file, because I don't know when it goes down (and it goes down quickly due to the large amount of data arriving). So perhaps I need some kind of memory logging node??
And secondly I'm wondering what is the best way (technically) to determine the size of a node??? I'm thinking about shared memory (somehow) or circular references perhaps, a node storing data on flow/global memory ... And not all data is stored in the context, like e.g. in the rbe node (from the discussion in the link above):
Since the data is stored in 'this' node, it won't be visible in the context store panel anyway: