When I first started with Node-red. I had trouble with memory leak, but after 1 or 2 months, it disappeared.
Now for as long as 2 months, I have the same issue again. But my application works fine, so far.
Every now and then the memory hit some 95%, and then resets to about 50 to 55 % and then builds up again slowly. If I restart Node-red or reboot RPI, it also drops again.
Today I did some minor chages, and now the memory will not go lower then about 85% and is very fast over 90%. Als the CPU is working like crazy and temp has gone up from about 32 dgrC to 47 dgrC.
Most of my application exist of some fast modbus connections and some slow http requests. Data saved to influxDB and some graphs and tables. Nothing special I would think. The Node-red log looks fine.
Anyone has any idea where to look for the cause ????
@jbud Indeed influx has been killed, but restored all write actions again. No problem with performance so far.
It is an RPI 3B+ with 1 GB memory , yes.
@jbudd , I restored all flows again. Performance is still rather good(usage and temp.) But memory still slow on the rise.Very strange where bad performance came from.......
Any other ideas where I can find where the memory build up comes from?
Don't worry about the memory for the moment, the main problem is the CPU usage. Possibly you have some sort of loop in the system. Or it could be influx. Does the CPU drop right down if you stop influx?
I don't see any problem there. Linux tries to make best use of all the memory there is, keeping disc buffers in RAM and caching stuff where possible. To get actual amount of memory available for use you have to look at the mem available figure. Node red is only using 17% of the ram.
Probably not related to your recent problems but certainly do look at InfluxDB and make certain that you have a retention policy in place for any detailed data. On your Pi, eventually you will start to get CPU spikes and SWAP use.
Try to keep detailed records only for a limited time. Typically I keep 1 minute records for 7 days but I have a continuous query that creates hourly records of everything in the 7 day store (keeping avg, max and min values over the hour for all values in the detailed store). I keep the hourly record for 5 years.
@Colin . Thanks. Yes, I can see also, that node-red is in fact only using 17 - 18% of the total memory it shows in TOP. Why dos it say in Node-red that it uses almost all of 924 MB available? Is there a way to increase mem available for Node-red?