Amazon Echo Control Binding causing "OutOfMemoryError: unable to create new native thread"


recently I have been getting issues with my OpenHab instance which is caused by too many threads being created. For example:

2020-06-15 05:49:03.386 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ende with an exception: 
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method) ~[?:1.8.0_222]
    at java.lang.Thread.start( ~[?:1.8.0_222]
    at java.util.concurrent.ThreadPoolExecutor.addWorker( ~[?:1.8.0_222]        at java.util.concurrent.ThreadPoolExecutor.ensurePrestart( ~[?:1.8.0_222]        at java.util.concurrent.ScheduledThreadPoolExecutor.reExecutePeriodic( ~[?:1.8.0_222]        at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:1.8.0_222]         at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_222]
    at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_222]
    at [?:1.8.0_222]

To narrow down the issue I started disabling bindings and found out that the number of threads stops increasing (after openhab restart) when the Amazon Echo Control (version 2.5.5) binding is disabled, so I assume that it’s the cause.

The binding worked fine without issues for a few weeks before this problem started to occur and I am not aware of any notable changes to my OpenHab configuration.
I also have a full thread dump (OpenHab running for approx. 1h) available here:

Any ideas how to solve this issue?

Please use the search function. This has been reported before and is fixed in 2.5.6.

Welcome to the Community!

As mentioned this has been fix in the latest update of OH. If you prefer not to update OH then you can uninstall the binding via PaperUI and install the snapshot jar file in /usr/share/openhab2/addons then restart OH.

Link to latest snapshot jar file:

Thanks for the help and link! I already searched for the updated version without success and then decided to upgrade the whole OpenHab instance to 2.5.6. This seems to have fixed the issue.

Glad you got it working. :+1:

Please click the square box on the post that provided the solution to mark the topic as solved.