I had very similar errors to this a few weeks back when I moved apartments. The reason seems to be that one or more bindings worked incorrectly when some devices/bridges/vacuum cleaner etc were disconnected. OpenHAB ate all memory and eventually had these errors. After connecting my devices or setting them as disabled in PaperUI everything has been running fine for about 2 weeks now.
I.e my best tip if you have not tried is to disable all devices that might not respond/be connected but still be included in your configurations/setup.
Thanks guys, thanks to your help, especially @gitMiguel latest post, it seems I identified the leaking binding. Need some more time to confirm it 100% as eventhough it stopped growing like before every couple of seconds, maybe I entered some coincidental period. Need some more time for observation but it seemed to be Xiaomi Mi IO Binding which started opening connections endlessly (more then 850 in the last 12 hours). I’m not solving it yet to confirm although I think this was the problem
Create an issue on the GitHub page and give a link to this thread in the issue, plus post a link to the issue here in this thread. It is helpful to know how many people get issues like this and if they are not easily reproducible to look at what is common between effected peoples setups.
Also worth trying older versions of a binding, if you find version x does not have the issue it helps find the cause quicker.
@Simsal I haven’t mentioned it to the creator as there is a thread (where creator is involved) which mentions that in the recent release there is a need to configure some device Id or some other parameter otherwise binding will behave improperly (I tried to find this thread to quote it here but for some reason can’t do it easily). I don’t have that device anymore to test biding deeply therefore I haven’t mentioned anything yet as maybe it is abovementioned problem. I suggest you raise it with binding creator. I will keep digging for the thread with problem description and post it here if find anything.
@Simsal this may happen if you have text config and/or connectivity issues.
If you have text config, please take a look at the readme and fully define the thing according to the example. If you have defined your thing with text config, ensure your IP and token are correctly populated. If you continue to have the issue, please send a debug log (longer period) so we can see what is happening that may trigger the behaviour.
thank you for reaching out to me. Appreciate it.
I recreated all my things this morning. Now I have just Paper UI created things with token from the cloud.
Items are via text config. This shouldn’t be a problem?
I will monitor now if the problem keeps coming up, if yes i will get you a debug log.
Hey Marcel. Yep, I’m on 2.5.8. I don’t have hard proof that your binding was indeed the culprit but the vacuum is the only device/item than can get (and was) disconnected. I’ll keep an eye on things over the next days and report back.
Same problem on FreeBSD 12, OpenJDK 11.0.11+9-1. shell:threads shows them all like this:
"Mi IO MessageSenderThread" Id=2143 in TIMED_WAITING
at firstname.lastname@example.org/java.lang.Thread.sleep(Native Method)
From a quick look at the code, I wonder if the thread leak happens when isAlive() returns false.
Yes, the >thousand of waiting "Mi IO MessageSenderThread" threads are only present in shell:threads (and the system e.g. top -H) but not in threads.txt of the dump. (Though the style of output is the same between shell:threads and the dump, aren’t they supposed to be the same thing?)