Web Socket Error on AmazonEchoControl binding every 65 seconds

Very big thanks!

shouldn’t then all be affected ?

Maybe it depends on the region where you are located (or where your account is registered).

I just checked my logfiles and it happend from time to time in the past. The first occurance of the error on my side was at:

2020-05-23 04:22:09.899 (UTC) (1 time)
2020-05-29 10:22:29.853 (UTC) (2 times)
2020-06-09 10:54:04.093 (UTC) (3 times)

and now continuously since

2020-06-12 07:38:19.670 (UTC)

The first OOM occured on

2020-06-13 00:43:21.730 (UTC)

I am using the api-url: https://alexa.amazon.de/api

EDIT: I converted CEST-timestamp to UTC

My oom starts at 1:30 at Saturday night. I think the error must start 00:00 between Friday and Saturday.
Times are local German time.

In past there where some threads here with same error, but most of them went OK afterwhile.

I can narrow down the point in time when the symptoms started between June 12th 03:30am and June 13th 03:30am (CEST), see also my explanation here.

In addition thank you for the memory/thread leak fix.

@andyzle What are you looking at? The first oom or the first “Web Socket error”?

The time where every connect failed. Something must have changed and that is clearly not on openHAB side. But maybe if we find out what has changed, we can adapt to that.

Maybe I’m wrong but we are all in CEST-timezone… So I guess most of us are using the german api-url:

https://alexa.amazon.de/api

right?

I refer to the web socket error, oom is only a severe side effect.

1 Like

I’m EST in the US

So you are using alexa.amazon.com right?

Right

But we need two changes then:

  1. Protect against the memory leak situation triggered by this or any similar scenario
  2. Identify specifically what is wrong on this Amazon integration and try to recover the functionality
1 Like

@J-N-K After the call of “webSocketClient.connect” in the “WebSocketConnection” contructor the handler should call the method “onWebSocketConnect”, but this never happens. So i think it stuck trying to establish the webSocket connection. “initPongTimeoutTimer” is also called in the constructor and tried to close after 60 sec. If the webSocketConnection is established everything worked fine and “initPongTimeoutTimer” was able to close it. It was necessary to cancel the “Future” to fix the memory issue, for sure. But it seems that this was only a very bad side effect.

Checked now when it starts:
2020-06-12 18:32:29.510 local German time. Means UTC +2.

Doesnt fix it

Exactly. This was clearly a programming error. But as you said: the root cause is that the connect fails. This is a bit surprising because In case of a failure onWebSocketError should have been called, which isn’t called either.

So for debugging we probably have to check if the amazon servers don’t respond at all or if the response processing fails (before it reaches our own code). Even if encrypted connections don’t produce readable content, using tcpdump or wireshark might give an insight on that.

Doesn’t fix what? You still see OOM?

I have sporadic instances of that error every day of the month (pretty much except the 8th of june), and even earlier during May…but then more continuously on the 12th of June until I uninstalled the binding.