UI becomes unresponsive after a few minutes

Hi,

I’ve been seeing a strange issue with HA OS for the last couple of months but I can’t find much in the way of information on the issue. Thought I’d post here to see if anyone had any ideas before opening an issue on GitHub.

I have HA OS installed in a VM on my Proxmox server. Generally traffic comes to this via an NGINX proxy however this issue still persists when I access HA directly. Recently, after a couple of minutes, the UI becomes completely unresponsive. I can click around the UI but anthing not already populated will just hang and any actions will not execute. No logs are generated in the Nginx access log so as far as I can tell, the UI is not sending any new requests to core. No logs are generated in the HA log when this happens either.

The closest I can get to some meaningful logging is in the Chrome developer tools:

ha-panel-profile.ts:200 Uncaught (in promise) {type: 'result', success: false, error: {…}}error: code: 3message: "Connection lost"[[Prototype]]: Objectsuccess: falsetype: "result"[[Prototype]]: Object
value @ ha-panel-profile.ts:200
await in value (async)
value @ ha-mfa-modules-card.ts:34
t.connectedCallback @ typography.js:181
value @ hass-loading-screen.ts:11
_currentLoadProm.l.then._currentLoadProm @ hass-loading-screen.ts:11
Promise.then (async)
value @ hass-loading-screen.ts:11
performUpdate @ styles.ts:369
scheduleUpdate @ styles.ts:369
_$EC @ styles.ts:369
await in _$EC (async)
requestUpdate @ styles.ts:369
set @ styles.ts:369
k @ styles.ts:369
_$AI @ styles.ts:369
m @ styles.ts:369
T @ styles.ts:369
_$AI @ styles.ts:369
S @ styles.ts:369
update @ styles.ts:369
performUpdate @ styles.ts:369
scheduleUpdate @ styles.ts:369
_$EC @ styles.ts:369
await in _$EC (async)
requestUpdate @ styles.ts:369
set @ styles.ts:369
k @ styles.ts:369
_$AI @ styles.ts:369
m @ styles.ts:369
T @ styles.ts:369
_$AI @ styles.ts:369
S @ styles.ts:369
update @ styles.ts:369
performUpdate @ styles.ts:369
scheduleUpdate @ styles.ts:369
_$EC @ styles.ts:369
await in _$EC (async)
requestUpdate @ styles.ts:369
set @ styles.ts:369
t @ home-assistant.ts:32
(anonymous) @ home-assistant.ts:32
i @ typography.js:181
s @ typography.js:181
(anonymous) @ home-assistant.ts:32

More info that might be useful.

configuration.yaml:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
  - platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor:
  - platform: rest
    scan_interval: 600
    name: "Outside Temperature"
    device_class: temperature
    unit_of_measurement: "<C2><B0>C"
    force_update: true
    resource: http://10.1.4.21:8080/
  - platform: rest
    scan_interval: 600
    name: "Outside Humidity"
    device_class: humidity
    unit_of_measurement: "%"
    force_update: true
    resource: http://10.1.4.21:8080/humi
http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 10.1.1.2
alexa:
  smart_home:
influxdb: 
  host: 10.1.1.10
  username: "home-assistant"
  password: <removed>
  database: "home_assistant"
hacs:
  token: <removed>
light:
  - platform: group
    name: "Living Room Lights"
    entities:
      - light.living_room_1
      - light.living_room_2
      - light.living_room_3
      - light.living_room_4
  - platform: group
    name: "Bedroom Lights"
    entities:
      - light.bedroom_1
      - light.bedroom_2
      - light.bedroom_3
      - light.bedroom_4
  - platform: group
    name: "Office Lights"
    entities:
      - light.office_1
      - light.office_2
      - light.office_3
  - platform: group
    name: "Hallway Lights"
    entities:
      - light.hallway_1
      - light.hallway_2
      - light.hallway_3
  - platform: mqtt
    schema: json
    name: "Living Room Cabinet"
    command_topic: "switch"
    rgb: true
    brightness: true
    optimistic: true
alarm_control_panel:
  - platform: manual
    code: "1234"
    delay_time: 30
    code_arm_required: false

NGINX config:

server {
    proxy_read_timeout 1d;
    proxy_connect_timeout 1d;
    proxy_send_timeout 1d;
    server_name ha.domain.com;
    error_log /var/log/nginx/hass.err.log info;
    access_log /var/log/nginx/hass.acc.log;
    location / {
        proxy_pass http://10.1.4.254:8123/;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;      
    }
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/ha.domain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/ha.domain.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
    if ($host = ha.domain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
    server_name ha.domain.com;
    listen 80;
    return 404; # managed by Certbot
}

Version:

Home Assistant 2022.7.6
Supervisor 2022.07.0
Operating System 8.2
Frontend 20220707.1 - latest

Hi @jakec and welcome,
There are a lot of topics about freezing GUI’s and there are a lot of different reasons for it to happen.
There are situations where IOWait that stalled everything, where the power supply was the issue (not likely in your case I guess) and also issues with USB3 interference.

My first guess would be that your hardware is heavily loaded. Second guess, file corruption (mainly noticed where SDCards are used, but still). A fresh install and restore of config might solve it. Since you use a VM, you might just want to run a second one that is as clean as possible, just to see if it freezes.