Documentation issue with docker-container

There is a Problem with the ENV-Variable Java_extra_opts:

One time its described to set it like this:

EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"

the other time like this:

"EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin"

There is also no way described how to figure out if the setting is working, or where to put it in the openhab docker files if you don’t want to put it as variable…

Did someone set extra java_opts to running docker? I need some settings here and didn’t get it to work…

Well, one time it’s showing how to pass that environment variable on a docker run command and the other is how to pass it as part of a docker compose YAML file. Both are correct in their specific contexts.

To tell if it’s working, once the container is up simply issue the command

docker exec openhab2 echo $EXTRA_JAVA_OPTS

or to see all the variables

docker exec openhab2 env

Ah okay I didn’t know that it has to be different there…thanks =) did you set/verify java_opts? I’ve a “run out of memory” issue…

Of course but I use yet another option, Ansible, to manage my docker containers.

If there is an out of memory issue expanding the heap isn’t going to fix things for you. You need to figure out which addon is causing the problem which likely will require trial and error.

My current suspect is the amzon echo control binding as this is known for this kind of error…the other one is the gardena binding but I don’t know how to properly figure that out yet…

So expanding heap will not help for the amazon binding?

Uninstall one and see if the memory leak goes away. If not uninstall the other one.

No, upgrading will help the Amazon binding. I think the problem has been fixed since at least 2.5.7, maybe earlier. Expanding the heap only adds a just a little bit of more time before it runs out of memory. It doesn’t solve the problem.

1 Like

Okay…maybe it would be cool to find a way to analyze this because I’ve 20 bindings and the issue appeard after 3 weeks of runtime…

Okay I’ve 2.5.9 maybe the issue comes from Plex binding (1.1 binding). Also gardens throws a lot of errors to the log…

The Amazon Control binding problem should be fixed, and when it was broken it would run out of memory within a couple of days at the most. Any binding that is throwing a lot of errors needs to be looked at anyway.

Okay very cool thanks :slight_smile:

I opened another thread for more intense discussion on this, as my memory leak keeps appearing…What to do on Java out of heap memory

I don’t know why, but this was never working for me on docker-compose.
I can confirm this working:

 EXTRA_JAVA_OPTS=-Xms500m -Xmx800m -Duser.timezone=Europe/Vienna

In my case, it seems that I don’t had a memory-leak, I was simply running out of ram… It’s working now since you helped me here together with others :slight_smile: What to do on Java out of heap memory. Paperui nevertheless became very slow over time, but since paperui is deprecated in OpenHab 3.0, this is not a problem :slight_smile:. As I should mention, I think I run almost a third of the available bindings at once, and keep a lots of rules and conditions as far as over 1000 items and over 100 things…so on a “normal” installation, this running out of memory shouldn’t really occur…

Nevertheless, a slight increase (about 100mb) in standard-setting would be nice if this is happening more often :slight_smile:.

Thanks to all for contribution :slight_smile: