Openhab not responding, Java heap space error

When your system has been running for a while you could make a heap dump and analyze where all the memory is consumed with Eclipse Memory Analyzer Tool (MAT). If you configure the runtime such that it will always write a heap dump on OutOfMemoryErrors (OOM) you can always analyze them after they just occurred. I am very interested in the results.

  1. Create a heap dump from the console with the dev:dump-create command. This may take several minutes when you run it on a Raspberry Pi.

  2. Try adding EXTRA_JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError" to your /etc/default/openhab2 file to get automatic heap dumps in case of an error.

See also:

1 Like