Closed dpositive closed 3 years ago
Hey there @home-assistant/core, mind taking a look at this issue as its been labeled with an integration (websocket_api
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
I'm having the same problem.
Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 10:07:03 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 9:59:48 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 9:18:01 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 9:12:49 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 9:07:34 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 8:23:00 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 8:17:45 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 6:48:03 PM – Home Assistant WebSocket API (ERROR) Client unable to keep up with pending messages. Stayed over 512 for 5 seconds September 24, 2020, 6:42:54 PM – Home Assistant WebSocket API (ERROR)
Regards Paul
This has been happening for some time, see:
+1
Same issue here!
Same issue in my logs
Same issue
I have the same issue for 20 minutes
Same issue, seems to have started for me after 0.118
same issue for me as well. not sure what it's related to
Also having same issue here, not sure when, may be 118.5
Having same issue with 2020.12.2
Same issue here with 2021.1.0
version | 2021.1.0 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
virtualenv | false |
python_version | 3.8.7 |
os_name | Linux |
os_version | 5.9.15 |
arch | aarch64 |
timezone | Europe/Berlin |
I too have the same issue
Confirming the same issues here on 2021.1.4.
Edit: I figured out my issue related more to heavy use of zwave devices with “secure node” protocol (mostly for locks and other secure devices). Reprogrammed all of them to normal nodes and the system works much better now.
Same issue here too.
Same issue
Same here with 2021.1.5
Same issue here. ”Client unable to keep up with pending messages. Stayed over 512 for 5 seconds”
is there anything to solve this?
Same issue here. Has the problem been solved?
Same issue for me too
Confirming the same issues here on 2021.1.4.
Edit: I figured out my issue related more to heavy use of zwave devices with “secure node” protocol (mostly for locks and other secure devices). Reprogrammed all of them to normal nodes and the system works much better now.
As nobody appears to be able to help. Could this be a trace. I see this from time to time in my logs and have no clue where the problem originates. Therefore - how about collecting configuration similarities among those that run into this issue. I do use Z-Wave as well, without the Z-Wave to MQTT AddOn. I have now tried to lower the Z-Wave network traffic by reducing update frequencies to a reasonable and necessary amount. I did already migrate to maria dB and that appeared to help as well. Any other suggestions? I do still encrypt Z-Wave and would like to keep it that way.
Same here on 2021.2.0 running on a rpi4. Not using z-wave at all.
Please use the profiler to generate a callgrind.out.xxx
file, zip it up, and post it here.
https://www.home-assistant.io/integrations/profiler/
For privacy concerns: The file will contain all the references to the python code that has been called. It will reveal which integrations you have installed, but should not reveal any personally identifiable information (unless you have somehow added written and added custom code that has your personal information it in the function names or filenames).
Thanks for the hint, here’s my output. callgrind.out.zip
I've gone through the profiles, and they all look like they are not overloaded at the time of the problem.
We need profile that was captured when the websocket is overloaded.
First of all - thank you soooo much bdraco. Yes, that is a problem for me. I see the error about 5 times a day. So catching that moment and getting a profile at that time is basically not possible. Even going for a verbose logging level will be tricky for a whole day. Any other ideas? Can we trigger profiles to run when trouble is logged?
Maybe create an automation to watch the system load https://www.home-assistant.io/integrations/systemmonitor/ and call the profiler.start
service when it goes above the level.
I've had this since forever, and recently the problem disappeared. The thing I changed is that I temporarily removed two rpis with screens in my home, that always show a couple of lovelace dashboards. I will keep an eye out for them to reappear when I start to use the screens again.
Edit: I have a lot of templating in the views that are shown on these screens. Someone said that might be an issue.
Are the Home Assistants all running on RPi or other commodity hardware?
I'm wondering if the JSON serializer performance is the constraint here.
I don't think we can do anything to improve the JSON serialize performance as it's already well optimized.
Maybe we could serialize before we put it in the queue. That ways it's only I/O bound instead of cpu bound
Looks like we already made that change so that's not going to help.
Are the Home Assistants all running on RPi or other commodity hardware?
I'm wondering if the JSON serializer performance is the constraint here.
Mine is a RPi 4, booting from SD and all HA Code and Data on an external USB3 SSD.
I have an old NUC.
I've had this since forever, and recently the problem disappeared. The thing I changed is that I temporarily removed two rpis with screens in my home, that always show a couple of lovelace dashboards. I will keep an eye out for them to reappear when I start to use the screens again.
Edit: I have a lot of templating in the views that are shown on these screens. Someone said that might be an issue.
What is templating ;-) No, sorry - I do know that but my interface is very basic - but I also notice that using more clients to connect seems to be related. I usually don't interact with the web interface of HA - as I handle almost everything by voice command and automation. Only when I have new devices I work a lot with the Web UI to integrate them - and that is where I noticed the errors. Lately there have not been any "keep up with pending messages" errors. I will keep an eye on it and post my profile under heavy load, as soon as I can get a grip on it.
Same
following .. same issue
Same Issue
Are the Home Assistants all running on RPi or other commodity hardware?
I'm wondering if the JSON serializer performance is the constraint here.
No, got this issue on a newer i5 NUC.
If you look at the developer console, and find the websocket connection in network (you may need to shift+reload), do you see any errors?
If you look at the developer console, and find the websocket connection in network (you may need to shift+reload), do you see any errors?
In the network tab (after refreshing) I see "?homescreen=1" fetching failed. Also sometimes get a ERROR 500 because it seems to fail to get a new image from my media_player sometimes: Request URL: https://x/api/media_player_proxy/media_player.nvidia_shield?token=x&cache=x Request Method: GET Status Code: 500 Internal Server Error Remote Address: x:443 Referrer Policy: same-origin
@Xitro01
Same issue for me as well. I can replicate this issue when typing a few characters into the entity_id input field in Developer Tools > States.
I'm running HA 2021.4.4, on a Ryzen 7 3700X, bare-metal (virtualenv install) with access to a very healthy mariadb server. Client is Chrome 89.0.4389.128, macOS 11.2.3, on an i7-9700K @ 5.2GHz. I don't immediately suspect performance is the issue.
That being said, I do have a lot of entities... currently 1,209, to be specific.
We have merged a change that will be in next months release that will reduce the pressure on the server side. If this still happens after installing the May release the issue is likely due to the performance on the client (browser) side and there isn't much we can do about it.
Client unable to keep up with pending messages. Stayed over 512 for 5 seconds still going core-2021.6.6
Have this as well on 2021.7 (and previous versions)
Same here for me seems to happen every day without fail
Same for me. I'm not sure if this is related, but all time sensitive automations have slowed down considerably recently, to the point where motion sensors or wireless switches are nearly useless - the delay is sometimes even 10+ seconds.
The problem
ERROR: "Client unable to keep up with pending messages. Stayed over 512 for 5 seconds" appears at the system log constantly
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information