Massive number of vague http errors in HA after restarting

Ever since I updated to v90 when I restart HA after making changes I occassionally get a huge number of these errors in the log:

2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512
2019-04-16 22:52:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140495766451480] Client exceeded max pending messages [2]: 512

Then after that everything seems to slow way down (likely because it’s writing literally thousands of those errors every minute) and it won’t even run my restart script that usually works perfectly so then I have to go into Portainer and restart HA several times before it starts back correctly.

Updating to v91 didn’t solve the issue.

Any idea where to look to figure out what the problem is?

Do you have:

websocket_api:

or

sensor:
  platform: websocket_api

in your configuration.yaml file?

No, I don’t have it anywhere in my configuration as far as I can find.

I used Notepad++ and did a “find in files” for my entire config directory and didn’t return any hits

…except for the 93,262 matches that it found in my homeassistant.log file telling me about the error!! :scream:

Are you running AppDaemon?

I get the same with HA on a mac. It seems to be linked when I open the front end.

2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512
2019-04-18 07:54:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.13904045672] Client exceeded max pending messages [2]: 512

No. not running appdaemon… (Silly 10 character minimum…:wink:)

Hmm. :thinking:

Do you have api_password: in configuration.yaml?

No, i got rid of that a few versions ago.

I don’t feel like I’m being much help just grasping at straws. :confused:

Can you think of anything that might be trying to communicate with HA over a websocket; something that sends data rather than being polled like most components?

Well I think your grasping at straws actually helped me. :grinning:

I forgot that I added an iframe to lovelace last week that showed the wind conditions in my area (windy.com).

I went in and disabled that and so far in the last hour I don’t have anymore of those errors. Just to be sure I’ll give it a few days like it is now to make sure the errors don’t come back then I’ll re-add the iframe and see what happens.

hopefully that’s it.

1 Like

Yeah yeah, that was exactly my intention. :lying_face:
:sweat_smile:

Glad it seems to be working. I wouldn’t have suspected an iframe but there’s a lot I don’t know about websockets.

1 Like

obviously, neither do i. :slightly_smiling_face:

1 Like

Nope, it didn’t fix it.

I’m still getting over 100,000 error messages in a few minutes after a restart.

Trying out the Discord channel to see if this can get any traction but so far it’s off to a resounding “thud” since I have no idea how that thing works.

1 Like

Same error here, any updates for this ?

No.

I tried over on discord too and there didn’t seem to be any real desire to help troubleshoot it over there :roll_eyes:

I’ll post the screen shots of the entire interaction below so you’ll know everything I know without having to wade thru the discord feed.

That’s literally it. Nothing else.

So, no, I don’t have any idea what’s causing it. Luckily it doesn’t happen very often and when it does happen I found that if I wait several minutes for the flood of logs to be completely written then eventually the system becomes available again and it doesn’t happen until the next restart…sometimes.

Can you make it error on demand?
I wonder if its an automation causing it?

No.

It’s pretty random. It maybe happens 70% of the time. And I’ve only ever noticed it immediately after restarting HA for a config change.

And for additional information…

it started again but now it’s not after a restart and it lasted pretty much non-stop for almost an hour. I ended up with over 500,000 error messages this time. the last restart was 8:30 this morning and the errors started with a vengeance around 14:15.

Coincidentally ever since this morning after updating to v92 I started getting a bunch of errors connecting to the asus router.

related?

Anyone else get any hints on how to resolve this? In my case, I think it relates to my NodeRed addon automation (which works) but is also throwing random API errors when calling HA services…

I had this same problem. I removed all statistics sensors and replaced with filter sensors. This fixed the problem for me.