Issue: constantly growing memory usage of OH 2.4 docker on Synology

I had no trouble setting up OH 2.4 as docker image on a Synology Diskstation. Was building up my setup and probably restarted the server often. All seemed fine back then. But since I stopped messing around and just have openHab running it eats RAM on the box like crazy (imho).

I run

  • openhab/openhab:2.4.0-alpine
  • on a DS918 with 12GB RAM, 2GB swap (automatically assigned by system)
  • addons, conf, userdata on volume outside the docker container

What is it doing?

  • polling data via http binding from three sources and using rrd4j persistence with the updateInterval=60000
  • reading some items via fritzboxtr064 binding, refresh=60000, no persistence
  • showing that data as text/charts/switches in a simple sitemap in the BasicUI

Right now, according to the Docker UI on the Diskstation, the container is running for 10 days and uses 3.3GB Memory.

top reports

PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND                                                                                                                                                            
29810 100       20   0 4968.0m 3.231g   0.0 28.0 461:50.00 S /usr/lib/jvm/java-1.8-openjdk/bin/java -Dopenhab.home=/openhab ....

It is not the only container running on that box but by far the memory hog above all. And it seems to grow continuously :frowning:

Any way to tame that beast - besides regular restarts?

regards

I’ve seen some other mentions on this on Synology.

Are you using the JS transform? I think there is a known memory leak when using that.

1 Like

Mostly JSONPATH and one REGEX

I restarted the container after my post and now, two days later it’s back already at 3.37GB :frowning: .

There is also a known memory leak in the TCP/UDP binding I think.

If you are not using that I’m afraid what you will have to do is systematically disable add-ons, one by one until the memory growth stops occurring. At that point you will know what add-on is causing the problems and an issue can be files on the right repo.