Memory usage grows steadily

Could you share a very simple repro flow that you can observe the same thing happening? This way someone here can take a look. Thanks

@AllanOricil
What are you referring to exactly?
Anyway, after having sorted out the errors I had, it's evident that the issue was not NodeRed related but to the lxpanel process. I tried to restart that process and the memory usage went immediately down to 15%. Looking around I found a thread were it seems that lxpanel is poorly written and some of its widgets have memory leaks.
I am trying disabling the widgets one by one and see what happens.

1 Like

(just passing and reading.)

May I ask what the cause of the ERRORS (that you fixed) were?

That

Is of slight concern - for me.

Yeah, I am not fully up to speed on what all the in's and out's are.
But.....
is not a node-red-node is curious.

Also, what are all the Serialconfig lines?
Sure they are allowed, but just asking in passing.

Something else which may be an issue.
Context is stored in memory.
If you have a lot of stuff stored, that may be a vector for memory usage.

The error you are referring to was caused by moving-average-contrib that every now and then was fed with an undefined payload. I tried to find from where and when the undefined was coming from and eventually I replaced that contrib with another one.
Regarding the serial connections, they are usb to serial converters coming from different devices that are fed into the raspi and managed from NodeRed flows; there are 11 of them connected to solar controllers, battery monitors, LiFePO4 BMSes, ZigBee hub and wind turbine controller.

1 Like

Ok.

So what about the context stuff?

Are you storing a lot of data as/in context?

I'm also wondering if you are making average readings/values for things: is that eating memory?
(Depending on how it is doing it.)

@Trying_to_learn
I save a bunch of values into flow variables but nothing to be noted and the moving average just updates the same variable overtime.
Anyway the analysis for the NodeRed memory use showed that it never goes past 3%.

Is this really true though ? You are running vnc server and lxpanel, which indicates a desktop environment.

Once you connect with vnc, ram usage will ramp up quickly - and specifically lxpanel has reported memory leaks (as per google).

In my post #21 of this thread, I already said that lxpanel has memory leaks and that I am disabling the widgets to see if anything improves.
I already mentioned that it is headless and I connect via vnc only to make configuration changes, I am not using the pi as a desktop computer. The memory usage increase was ramping up without connecting in any way to the pi.

Also the memory ramp up has nothing to do with node red as far as we know.

Just to note that VNC IS a desktop, it does have a significant impact. I have a container that runs VNC so that I don't have to leave it running all the time as I very rarely use it.

Sure enough, at the beginning I was wondering if any flow I made could possibly had something wrong, but this was not the case either.

Sure, but I have never said that the configuration was not a desktop one, simply that I was not using it as a desktop computer. :wink:

Not getting at you. It is simply that using any kind of desktop on a Pi along with other things sucks up a LOT of resources. If you are having resource issues, this is something to look at early. In particular, once your Pi starts to use SWAP space, performance can take a nose-dive.

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