Openhab 5.0.1 on docker java-21 high cpu and ram usage

Yes, if the CPU is also placing a high load on the system. What do you see in top or htop in terms of system load and memory usage?

Running the following command in the karaf console will tell you which threads in OH are using the most CPU.

ttop --stats=tid,name,state,waited_time,waited_count,blocked_time,blocked_count,user_time,cpu_time,user_time_perc,cpu_time_perc,lock_owner_id,lock_owner_name --order=cpu_time --millis=300

See High CPU Usage since upgrade to 5.0.1 - #4 by rlkoshak for details.

So far the number one culprit has been rules. However, there is a strange bug that just got fixed which lead to an infinite loop when running a persistence action from a rule on InfluxDB and there was no data there over the requested time period (if I understand the problem correctly). So double check that as well.