Browsing to 'Developer Tools / States' freezes browser

Running core via docker container here, and for the past few months it feels like navigating to Developer tools / states on a web browser or mobile app completely freezes the client. Looks like homeassistant itself remains just fine, and I have seen nothing in the logs regarding this event.

Anyone else seen this issue?
For reference, I’m using the mobile app and firefox on a machine with 12 cores and 16GB of ram to access the web ui and it still freezes the machine.

Mine is slow but never locks up, takes sometimes 3 or 4 seconds.
One thing I did was make the “attributes” column hidden.
I have many REST sensors that have large attribute payloads.
Hiding this column speeds things up considerably and you can select to turn it on should you need to be look at the values.

1 Like

I can’t even get it to load once to try this…it completely locks up for me

Do you have a huge amount of sensors? I have like 700 of them.

Probably. I don’t know the exact number of sensors, but definitely more than 700 entities + some template sensors. Given than some devices provide several sensors, its 700 sensors is definitely not out of the realm of possibilities

Keep in mind that, state attributes are also impacting the load time. Actually, each sensor can have multiple ones and it gets too much data to be handled for a browser very quickly.

So, I guess that means I am not the only one having this issue?

Is there any solution or workaround to mitigate this?

That was the point I was making. I have some huge REST sensors (Daily News, Sports Statistics and standings for NFL, NHL, MLB, NBA) whose attributes are very large. Although I will say I think the issue is deeper for @IOTNinja. My HA machine is redone gaming PC, i7 Quad Core, 12GB memory, running Linux Mint. While I will admit that that screen does take a few seconds to draw, it is never more then 4 or 5 seconds. And I note that if you turn off display of attributes it is nearly immediate. If you then in the screen turn it on, it takes that 4 or 5 seconds. So mine is driven by the size for sure, but it always displays.

Side Note: I use the the Windows App mostly but just used the IP address and Web Browser and got the same … 4 secs in Chrome, 7 secs in Edge, 3 secs in Firefox. If I use my mobile phone app, it displays immediately but the “attributes” column is hidden by default in that view for me.

My symptoms are definitely worse than that, i’d be more than happy with a 10 second delay… but this is more like a solid lock up than a delay.
My homeasistant runs on an RPI4, but I will say that I dont think this is related to the host itself. I run grafana and Prometheus to monitor all of my boxes and I can see that when I click that the client box starts burning ram until it chokes. This happens on the client visiting the homeassistant URL, not on the homeassistant host itself. I can ssh into the homeassistant host from another box and the resources there are not strained at all.

This leads me to believe maybe something in the UI is causing the ram to choke the client, but I have no idea where to even begin debugging or dianosing this.

As the state size increases, and drawings happen on client side, it is definitely about browser on client machine.

But, if the data size is too big, you cannot fix it with stronger client right? You need to adjust the number of entities and attributes.

Is this something that can be done without having to navigate to this place on a web browser? Like on the homeassistant config?

I think it is 100% related.

Well, i’m no expert, but what i’m seeing doesn’t support that theory. The resources on the homeassistant host do not blink at all while this is happening. See screenshots of the monitoring dashboards for the same period of time. One showing the server and the other showing the client. You can clearly see the client is the one suffering here.

Homeassistant host while the client navigates to Developer Tools / States

Client visiting Developer Tools / States

we need more data points to understand this claim better. Are you saying that, browser is freezing because server is high on load?

No. I’m saying the the browser is freezing while the server’s load remains unchanged or unaffected.
@kbrown01 suggested the server was running out of resources, which is not what i’m seeing.

I am using reply functionality to target specific posts rather than the last one :slight_smile: so my post was answering #13 from @IOTNinja as you do.

I think I found the culprit. Further digging around pointed towards the iBeacon integration, which has caused this issue for some users before. I remember that for me came about at the same time as the BLE tracker in a failed attempt at better presence detection on my part. These 2 integrations of course flooded my known_devices.yaml

In the end, I disabled both iBeacon and the BLE tracker integration. Then cleared out the known_devices.yaml file and restarted homeassistant a few times. After all that, looks like all is well for me.

Hope this helps anyone else who may come across this issue in the future.

2 Likes

FYI: There is an option on these integrations to be track new devices automatically or use known devices file to control them.

Good to know. I totally missed that when setting up of course

Just to add my experience, Node-Red was freezing in the browser for 45 seconds when I clicked on a “events: state” node and clicking on Developer Tools → States in HA itself was only impacted by around a 5 second delay.
I removed the “platform: bluetooth_le_tracker” from configuration.yaml and also deleted my known_devices.yaml file and restarted HA, but it was still not right. Only after rebooting the whole HA stack including MariaDB and such (in docker) did it all start responding normally.
Perhaps it will help another NR user.