Open mdicke2s opened 6 years ago
From @mjagdis on November 17, 2017 1:4
Run "systemctl show openhab2.service" and look for a TasksMax setting. If it is anything other than "infinity" try "systemctl --runtime set-property openhab2.service TasksMax=infinity". If that's the problem you either need to add the TasksMax setting to the openhab2.service file or run the set-property thing again without the --runtime so it will persist across reboots.
A while back the systemd folks decided that people should be protected for their own good and decided to make TasksMax default to 512 (I think). That leads to exactly this fork failure in thread-hungry java. Took out my Minecraft server just yesterday so it's all in my scroll back :-)
From @mastix on November 17, 2017 8:52
Hey @mjagdis ,
thanks for the hint!
I'll give it a shot and will update this issue as soon as I can confirm this settings fixed things!
Greetz,
Sascha
From @mastix on November 19, 2017 11:39
Problem still occurs: :(
Value is set:
TasksMax=18446744073709551615
2017-11-18 17:42:00.032 [ERROR] [ore.internal.events.OSGiEventManager] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: java.lang.OutOfMemoryError: unable to create new native thread
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: unable to create new native thread
at java.util.concurrent.FutureTask.report(FutureTask.java:122) [?:?]
at java.util.concurrent.FutureTask.get(FutureTask.java:206) [?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194) [97:org.eclipse.smarthome.core:0.9.0.201711151730]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83) [97:org.eclipse.smarthome.core:0.9.0.201711151730]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67) [97:org.eclipse.smarthome.core:0.9.0.201711151730]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager.dispatchESHEvent(OSGiEventManager.java:203) [97:org.eclipse.smarthome.core:0.9.0.201711151730]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:176) [97:org.eclipse.smarthome.core:0.9.0.201711151730]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:158) [97:org.eclipse.smarthome.core:0.9.0.201711151730]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.2]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90) [3:org.apache.karaf.services.eventadmin:4.1.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method) ~[?:?]
at java.lang.Thread.start(Thread.java:717) ~[?:?]
at java.util.Timer.<init>(Timer.java:160) ~[?:?]
at java.util.Timer.<init>(Timer.java:132) ~[?:?]
at org.openhab.binding.homematic.internal.misc.DelayedExecuter.start(DelayedExecuter.java:45) ~[?:?]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.disableDatapoint(AbstractHomematicGateway.java:730) ~[?:?]
at org.openhab.binding.homematic.internal.communicator.virtual.ReloadAllFromGatewayVirtualDatapointHandler.handleCommand(ReloadAllFromGatewayVirtualDatapointHandler.java:55) ~[?:?]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$1.execute(AbstractHomematicGateway.java:552) ~[?:?]
at org.openhab.binding.homematic.internal.misc.DelayedExecuter.start(DelayedExecuter.java:61) ~[?:?]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.sendDatapoint(AbstractHomematicGateway.java:544) ~[?:?]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.sendDatapoint(AbstractHomematicGateway.java:523) ~[?:?]
at org.openhab.binding.homematic.handler.HomematicThingHandler.handleCommand(HomematicThingHandler.java:175) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl$1.call(ProfileCallbackImpl.java:61) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl$1.call(ProfileCallbackImpl.java:1) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:218) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67) ~[?:?]
Any more ideas? Is my rule OK? It looks like it's happing around 18-20 minutes after the washing machine has stopped.
From @lampi87 on January 5, 2018 22:0
Same for me. I get the OutOfMemory exception when ccu is not available anymore All of my rules are "Item... Changed" so no polling within my rules
From @Flole998 on March 3, 2018 14:31
Same here after I configured a bridge which is not here yet.
@mastix As @FStolte mentioned, this bug may be related to #3388. Could you please verify if the issue is still valid with OpenHab 2.3.0?
From @mastix on November 16, 2017 13:31
Hi guys,
My setup
Expected Behavior
Expected: Everything should run stable. :)
See rule:
Questions upfront
Is there some manual heap tweaking necessary when using 768MB RAM? Is there a memory leak in my rule? Is it ok, to poll the values from CCU2 every x minutes or is there a better way?
Current Behavior
I'm getting an OOM error every once in a while - of course it's not easily reproducible:
Does anyone have any idea? Any help would be appreciated! 👍
Regards,
Sascha
Copied from original issue: openhab/openhab2-addons#2849