Closed spy0r closed 3 years ago
Here is another example: https://community.openhab.org/t/oh3-high-cpu-load-unresponsive-oh/111158/10
Could you post a very simple example on how to reproduce? Like taking a fresh OH install, creating a rule that does a log message every second and see that this goes into an OOM after a while?
I could set up a very small example, which got me a 100% cpu usage after half an hour:
postUpdate(debugItem, now.toString)
Wait and see the CPU load rising... I couldn't get OOM-Errors so far, but the rising CPU load is inevitably causing problems anytime.
I have been building a JRuby based rules engine and during automated testing I have noted that I do periodically get OoM errors. I have not yet done any deep dive to determine root cause. I am sharing here in case the it helps debug in case the OoM may be shared by something common in the script engine implementation rather than the DSL specific script engine.
Thanks for the report. I have created https://github.com/openhab/openhab-core/pull/2057 for it, it would be great if you could test a snapshot, once that PR is merged and available in the distro!
@boc-tothefuture Thanks for the hint, but I think this issue here is very specific to the DSL script engine. If you see issues with other scripts as well, please try to analyze and create a dedicated issue for it.
Yes, i will do the testing once it's available.
I can confirm that this isn't happening anymore in a current snapshot (tested 3.1.0~S2123).
Thanks anyone!
Excellent!
This issue has been mentioned on openHAB Community. There might be relevant details there:
My Pi 2 has been running slugish and I got the out of memory exception. In openhabian-config
under 40 - openHAB Related I changed to snapshot build. After that the setup has been snappy.
Is the plan to release a 3.0.1 build including this fix so new users downloading the stable image don't run into this problem?
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/oh3-crashes-with-outofmemoryerror/114934/2
Hi,
for me the problem is not solved (except I use the .rules files again. The CPU Load for the JAVA process is going through the roof (most of the time > 100%), even if there is enough MEM available. But of course I am not that expert that can see what happens really to the memory. But a screenshot shows the situation short before the OOM Message in the log appears. Machine is getting slower and slower and at the end complete responseless fr a click in the WebUI. I am on Snapshot 3.1 Build #2159. (Raspbery Pi4 8GB)
I did a lot of testing today for rules which were created and maintained via WebUi. So, entering, rules, saving, running. All the stuff, and at the end the responsiveness decreased....
Hope this input helps (?)
i did another test run with the example i posted here with the build #2159 you mentioned.
I did not run into any trouble again, maybe you should open another issue and share more information on your specific setup. Maybe you can find a small example to reproduce your behavior to make it easier for the developers to reproduce.
Which tool (?) do you need to show such a CPU Load Graph?
I will try to get more detailed infos :)
Has this been fixed with OH3.0.1?
I only use DSL rules via MainUI.
I did not find it in the 3.0.1 Release Notes or overread it.
It seems the patch is applied to version 3.0.1, but the problem is in Version 3.0.1 still existing.
I have the also a heap space error in the logs with 3.1 Milestone 1. System is unresponsive and slow.
@kaikreuzer : is this a known problem in the milestone?
This issue has been mentioned on openHAB Community. There might be relevant details there:
This issue is still existing in OH3.0.1. Some users reported it in this thread https://community.openhab.org/t/openhab-3-runs-out-of-memory-java-heap-space-errors-cpu-100-after-a-few-hours/110924/99 Since this ticket is closed, should it be reopened or should a new one raised?
What was fixed was indeed only the performance issue, but not necessarily a memory issue. Memory should be addressed by https://github.com/openhab/openhab-core/pull/2182, so there's no need to open another issue.
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/requests-always-fail/119667/5
System (Proxmox VM):
Openhab:
Java:
Scenario: Migrating DSL-rules from OH2 to OH3 via the UI cause "out of memory issues" (java heap space). One can see, that those (easy) rules run extremely long (up to many seconds - seen in the rule status indicator in the UI or via the java processes top -H -p yourOH3javaProcess)
Solution: To get a stable OH3 instance i needed to put those rules in files again, like in OH2. Same rules, same trigger, no problems. Those rules run that fast then, that you can not even see the "running" state in the rule indicater.
See also https://community.openhab.org/t/openhab-3-openhabian-runs-out-of-memory-java-heap-space-errors-cpu-100-after-a-few-hours
An example rule was this: