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
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.
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.
More RAM can always help. Will it be enough? 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.