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 ] [] - 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( ~[?:1.8.0_252]

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

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

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

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

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

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

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

	at org.openhab.binding.zwave.handler.ZWaveThingHandler$ [bundleFile:?]

	at java.util.concurrent.Executors$ [?:1.8.0_252]

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

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

	at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:1.8.0_252]

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

	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_252]

	at [?: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