Hello everyone, I’m facing an issue with my OpenHab setup on a Raspberry Pi 4. I’ve been encountering multiple ‘java.lang.OutOfMemoryError: Java heap space’ errors in my logs, which is causing OpenHab to malfunction. Here’s my setup:
Hardware:
- Raspberry Pi 4 - 4GB RAM
- Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
Java Version:
- openjdk version “11.0.7” 2020-04-14 LTS
- OpenJDK Runtime Environment Zulu11.39+61-CA (build 11.0.7+10-LTS)
- OpenJDK Client VM Zulu11.39+61-CA (build 11.0.7+10-LTS, mixed mode)
OpenHab Version:
- 2.5.5
The errors started appearing a few days ago and have been recurring frequently. Here are some snippets from my logs:
Jun 21 00:01:49 raspberrypi karaf[494]: Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “WebSocketClient@16653809-13598”
Jun 21 00:10:42 raspberrypi karaf[494]: Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread “OH-thingHandler-6”
Jun 21 00:14:30 raspberrypi karaf[494]: Exception in thread “WebSocketClient@1847614-20089”
I’ve noticed that the errors occur across different threads, which suggests that it’s not isolated to a single component. I’m wondering if this is a known issue with OpenHab 2.5.5 or if there’s a configuration tweak that can help mitigate this problem.
Has anyone else encountered similar issues? Any advice on how to resolve this would be greatly appreciated. I’m considering adjusting the Java heap size or looking into memory management settings within OpenHab. If anyone has successfully resolved this issue, I’d love to hear about your solution!
Thanks in advance for your help!
Best regards,
Tobias