OH2.5.3 Docker - RAM usage growing

I am running OpenHab 2.5.3 in Docker on my Timberwolf Server.
From time to time it appears to crash (KNX Bridge offline, no connection to openhab possible anymore) so this time i checked the ram and cpu usage. Both was quite high. RAM usage was close to 4 Gigabyte while 4GB is max offered.

After restart, it consumes about 600 Megabyte but despite that i disabled and deleted the logfiles (openhab.log* and events.log*), it still grows.

Any ideas why? Any ideas how to avoid?
I can limit the resources offered to this container but im wondering if this would just lead to a faster crash (due to faster reaching the max resource limit)

Are you using the amazon echo control binding? They’re an issue with memory usage very high

Indeed, i use it for some Text To Speech and Notifications (Weather).

Is this just a high memory usage (like my 600-700MB) or is this (additionally) a memory leak leading into constantly growing ram usage?

Any workaround?

PS: I am already near 800MB of RAM

Use the snapshot jar file from the link below as the fix has been merged.

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.amazonechocontrol/2.5.6-SNAPSHOT/

1 Like

Thank you. Might it be possible for you to give a short description how to put this into my running system?

You may need to check the location for docker but on Linux install the location to place the jar file is /usr/share/openhab2/addons.

With Docker do you have access to the Karaf console?

EDIT: just checked the doc’s and looks like it’s /opt/openhab/addons for docker.

1 Like

Ok i have access to this directory but its empty. I just place the org.openhab.binding.amazonechocontrol-2.5.6-SNAPSHOT - file there and openhab will replace the old amazon echo control?

From the command line type sudo openhab-cli console you will be ask for a password and the default is habopen.

Once you are in the console you can try and update the binding using the command **bundle:install https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.amazonechocontrol/2.5.6-SNAPSHOT/org.openhab.binding.amazonechocontrol-2.5.6-SNAPSHOT.jar

I normally do not install jar files this way so please make sure you have a backup to restore from if things go wrong. I would recommend finding the correct additional addons location for docker and placing the jar file there.

Thanks.

How do i confirm to be in the correct addons folder? Should it contain some “old” files? Because i have a readme in my addons-folder which is from openhab so if there are not at least 2 addons folders this should be it

It’s referred to as the additional addons file and I’m searching now to confirm the location. What does the readme file say?

Thanks. It says

This folder can be used to deploy artifacts into the openHAB runtime.

Bingo, that is the spot!

First make sure to uninstall Amazon Control Binding, stop OH, clean the cache then restart. After OH has fully restarted then place the jar file in the addons directory and restart OH. After restarting the binding should be installed.

EDIT: I forgot to mention that you may want to check the owner/permissions after placing the jar file. Owner should be openhab:openhab and permissions -rw-rw-r–

1 Like

Great,

ill do

  • a Backup
  • Uninstall Amazon Control
  • Stop OH
  • Delete userdata/cache and userdata/tmp
  • Start OH
  • Place JAR file in Addons
  • Restart OH again

Thanks

1 Like

Yes that looks to be correct. :+1:

See my edit in post above about permissions.

@Saarlaender please post back how everything works out. Thanks

Sure. It appears to be successful (the install of the new amazon binding) because i have no amazon binding under paper ui but the binding is running as i see in the logs (came back online).

So is it correct that i dont see the new amazon binding in paperui somewhere?

at this moment i have 645.61 MB RAM usage. I will see if this will increase again or not.

:+1:

It should be listed under Configuration > Bindings but you will not see it showing as installed when looking in Addons > Binding.

If you no longer see the jetty timeout error in logs then you should be good. :wink:

@H102 great job helping folks with this :+1:
For me, all I had to do was uninstall echo binding from Paper UI and drop the file into addons folder…
no restart needed or anything, a few moments after the file got placed into the folder, my device came online and began to work

1 Like

Thanks for the :+1:

That is what I would normally do myself but I’ve read where removing the binding, cleaning the cache, etc… was needed so just wanted to cover all bases the first time.

Are you running OH in Docker?

No I am not. My system is on a dedicated desktop PC running Mint 19
sorry for not mentioning this since this thread does mention Docker in the title

yes, very appropriate and prudent