Increase in the memory usage of the Genieacs container

Hi,

I am using GenieACS version v1.2.13+250122e151 that is installed inside docker container. It works properly for almost 2 years now of which 8 months it has production devices on it (around 800 of them in this moment)

However I noticed increase in the memory usage of the GenieACS container after the start of the FW upgrade action on just 2 devices that doesn’t decrease after that action has been finished. I used both Grafana toll and docker stats command ant both of them show the same. Please find the screenshot in the attachment with red rectangulars showing three moments when I started FW upgrade action from the GenieACS GUI.

After i restart the docker container with GenieACS memory usage drops. Is there some other solution for this issue?

Best regards,

Tarik

I did some additional debugging by using this command:

docker exec -it genieacs bash -c ‘while true; do date; ps -eo pid,rss,comm,args --sort=-rss | grep genieacs; sleep 10; done’

and later this one with longer sleep period:

docker exec -it genieacs bash -c ‘while true; do date; ps -eo pid,rss,comm,args --sort=-rss | grep genieacs; sleep 60; done’

Here is the link with raw logs:

and another summary one:

although in this period situation with memory was pretty stable.

I started one script that activates itself every hour to execute docker stats genieacs command and in the same time to run ps -eo pid,rss,args --sort=-rss | grep genieacs inside genieacs container. Output of more than 24h of running these commands are in this file: Dropbox

There was a FW upgrade on 2 devices around 10:15 today and for that reason there is huge increase in the memory usage between 09:50 and 10:50. Before that there was a small but steady increase in the memory usage of the GenieACS docker container.

Can somebody give me a hint what could be the cause of this constant memory usage or at least tell me that this is what is expected to happen?

It seems that there is some kind of garbage collection implemented that kicks from time to time and reduces the amount of the memory used. Here is one such example:

The overall amount of memory increases slowly, but with this garbage collection mechanism and a monthly reboot of the Docker container, it seems to be bearable after all.

That pattern is fairly typical for Node.js: RSS can stay high after garbage collection because V8 does not always return freed pages to the OS immediately. Firmware upgrades create many short-lived CWMP sessions and large parameter trees, so a temporary spike followed by slow growth is plausible. Your monthly restart is a reasonable workaround. To narrow it down, compare RSS per GenieACS process in your 24-hour log; if only the CWMP process grows, look at active sessions, scripts, and upgrade concurrency. A heap snapshot taken at peak can show what is being retained.