Openhab crashes after some days

Since Openhab 3.x I have the problem, that the CPU increases and Openhab crashes after some days.
It is still there with OH 4.1.1

Does anyone habe any idea where I could look. There is nothing special in the log, except the crashing things at the end.

Im am using Docker on a Synology Disk Station.
Installed Add-Ons:
Astro, aWWatar, evcc, Exec, Goe-Charger, Home Connect, iClendar, KNX, Miele Cloud, Modbus, MQTT, Network, NTP, OpenWeatherMap, SMA, SNMP, System Info, Telegram, tibber, WLED

JavaScript Scripting
JavaScript Scripting (Nashorn)
Jython Scripting

Homekit
OpenHab Cloud

InfluxDB
RRD4j Persistence
MapDB Persistence

JSONPath Transformation
Map Transformation

What are the other resources on the system when it crashes: RAM, Disk I/O, network, etc?

When the CPU starts to ramp up does top tell you anything informative?

Without any other information, I’d start by eliminating add-ons one at a time until the problem goes away. Start with the less popular add-ons (e.g. aWWatar, SMA) and gradually move towards the more popular ones. Because the more popular bindings are used by more people, if the problem were there it’s more likely that someone else would have encountered it and reported it.

I will have to observe the other system resources during the next crash. I will report them here.

Sadly I did’t manage to use the “top” command for the docker container.

Run it outside the docker container. It gives the system information of the whole machine.

Now I collected some data.
The Heap goes up to almost 100%
top -H in the container says G1 Conc#0

top on the synology says /usr/lib/jvm/java-17-openjdk-amd64/bin/java -XX:-UsePerfData -Dopenhab.h+

Any idea? Thanks



Your load average is out of sight. Anything more than 1 is a bad thing. That number represents how many processes are blocked waiting around for resources (usually RAM, file IO, or network).

You have almost no memory free and you are using more than half of your swap so I’m going to guess it’s RAM.

In short, you’ve too much running on this machine. You need to move services to another machine to free up some RAM.

Often times when a Linux machine runs out of RAM, it starts to kill processes to free up memory. I’ve seen this on RPis for sure.

At this point all I can recommend is moving OH (and perhaps some other sergices too, 6GB RAM doesn’t leave much left over after all the NAS functions and operating system are taken into account.

Ah, thank you!

I always thought RAM is not my problem.

Bildschirmfoto 2024-02-13 um 21.17.17

I will move OH to a new raspberry.

Could adding some RAM (16GB) help?
Or should I definitely go for new hardware?
Thanks!

More RAM can always help. Will it be enough? :person_shrugging: All I can say right now based on the output of the top command is your current system’s load is way high and it appears to be lack of RAM is the reason given how much swap is in use.