java.lang.OutOfMemoryError: Java heap space on old and new virgin installation

Hi all, I have a raspbian pi4 working with openhab 2.4 from many months running without any problems (no updates and no adding rules or things, or items configuration is the same from months) and from 4 days I’m having:
java.lang.OutOfMemoryError: Java heap space

Ok so I reset my Raspberry and I installed last 2.5.5-1 on a new virgin image, and got the last backup (done with openhab-cli backup command) of the last backup done 4 months ago (when all was running good). After 1 day I got again, please help me:

2020-06-18 09:59:18.756 [WARN ] [org.eclipse.jetty.io.ManagedSelector] - java.lang.OutOfMemoryError: Java heap space

2020-06-18 10:11:19.332 [ERROR] [nternal.handler.NetatmoDeviceHandler] - Unable to connect Netatmo API : Java heap space

2020-06-18 10:12:21.479 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 3: Polling aborted due to exception

java.lang.IllegalStateException: Timer already cancelled.

	at java.util.Timer.sched(Timer.java:397) ~[?:1.8.0_252]

	at java.util.Timer.schedule(Timer.java:208) ~[?:1.8.0_252]

	at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager.startTransactionTimer(ZWaveTransactionManager.java:1005) ~[bundleFile:?]

	at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager.addTransactionToQueue(ZWaveTransactionManager.java:376) ~[bundleFile:?]

	at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager.queueTransactionForSend(ZWaveTransactionManager.java:332) ~[bundleFile:?]

	at org.openhab.binding.zwave.internal.protocol.ZWaveController.enqueue(ZWaveController.java:505) ~[bundleFile:?]

	at org.openhab.binding.zwave.internal.protocol.ZWaveController.sendData(ZWaveController.java:889) ~[bundleFile:?]

	at org.openhab.binding.zwave.handler.ZWaveControllerHandler.sendData(ZWaveControllerHandler.java:472) ~[bundleFile:?]

	at org.openhab.binding.zwave.handler.ZWaveThingHandler$1.run(ZWaveThingHandler.java:427) [bundleFile:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_252]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Same here. I use a the latest docker image and since last Friday June the 12th I got out of memory errors about ca. every 8-12h. I changed nothing on my setup. Only the Docker container is updated every 24h if there is a new latest image. I restored my backup from one week ago, but I still get out of memory errors.

I can see in Grafana that the memory usage increases continuously. Played around with XMX and XMS, but nothing helped. Looks like the GC does not work anymore.

Anyone else with these problems? Perhaps there was a Java Update.

Are you guys using the AmazonEchoControl Binding? Then check this post:

yes I’m using amazon echo control binding…ok I try to uninstall it and let’s see what’s happen

I’am using it, too, but don’t get any errors of that binding. On my side everything is fine till the out of memory errors starting. No errors in the logs.

Unfortunately it still seems to be the root cause of that problem.

Ah… nice, someone has the same with corrupted things in Paper UI. Same here today morning after the out of memory crash.

If OH crashes with OOM errors while it is writing to the JSONDB, it will fail to complete the write and you will end up with an empty or partially written file. You should be able to restore that file from the automatically created backup though when this occurs.

Seems working without any problem without the amazonechocontrol binding

1 Like