home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.95k stars 2.66k forks source link

Memory leak on chromium ? #21006

Open ouafnico opened 3 months ago

ouafnico commented 3 months ago

Checklist

Describe the issue you are experiencing

When using a chromium as kiosk mode, opening homeassitant dashboard, I've got a very high memory usage after some minutes/hours.

The running machine is starting only chromium as kiosk, with only homeassistant page. The actual machine is using almost 2GB memory after some hours :

image

image

The dashboard shown is using "kiosk_mode".

Sorry if it's not the best way/place to do this. Anyway I can help...

Describe the behavior you expected

Stable memory usage for some days? :)

Steps to reproduce the issue

  1. Use a dedicated chromium with homeassistant dashboard
  2. Use kiosk_mode
    kiosk_mode:
    non_admin_settings:
    kiosk: true
    ignore_entity_settings: true
  3. Let the system show the dashboard, continuously.
  4. Check the memory usage.

What version of Home Assistant Core has the issue?

2024.5.5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Chromium 111.0.5563.147

Which operating system are you using to run this browser?

Debian 11.9

State of relevant entities

No response

Problem-relevant frontend configuration

kiosk_mode:
  non_admin_settings:
    kiosk: true
    ignore_entity_settings: true
views:
  - title: Home
    visible:
      - user: b5d53645eeac4e51819af1101a9735ea
      - user: b236a475d7504d40a63d9f8294bfd6ef
    badges: []
    cards:
      - camera_view: auto
        type: picture-glance
        title: Birdeye
        entities: []
        camera_image: camera.birdseye
      - type: horizontal-stack
        cards:
          - show_name: true
            show_icon: true
            type: button
            tap_action:
              action: call-service
              service: automation.trigger
              target:
                entity_id: automation.robot_rdc
              data:
                skip_condition: true
            entity: automation.robot_rdc
            name: Nettoyer RDC
            icon_height: 32px
            icon: mdi:robot-vacuum
            hold_action:
              action: toggle
          - show_name: true
            show_icon: true
            type: button
            tap_action:
              action: call-service
              service: automation.trigger
              target:
                entity_id: automation.robot_aller_a_la_cuisine
              data:
                skip_condition: true
            entity: automation.robot_aller_a_la_cuisine
            name: Aller à la cuisine
            icon_height: 32px
            icon: mdi:robot-vacuum
            hold_action:
              action: toggle
      - type: vertical-stack
        cards:
          - type: tile
            entity: sensor.shelly_uni_temperature
            vertical: false
            tap_action:
              action: more-info
            icon_tap_action:
              action: none
            name: Température Extérieure
            color: deep-orange
          - type: tile
            entity: sensor.lixee_zlinky_tic_apparent_power
            name: Consommation Electrique Actuelle
            tap_action:
              action: more-info
            icon_tap_action:
              action: none
            color: green
          - features:
              - type: target-temperature
            type: tile
            entity: water_heater.classe_a
            vertical: false
            name: Chauffe Eau
            icon: mdi:coolant-temperature
            show_entity_picture: false
            color: primary
            hide_state: false
            state_content:
              - current_temperature
              - state
      - square: true
        type: grid
        cards:
          - type: thermostat
            entity: climate.gainable_rdc
            show_current_as_primary: false
            features:
              - type: climate-fan-modes
                style: dropdown
                fan_modes:
                  - Quiet
                  - low
                  - medium
                  - high
                  - auto
              - type: climate-hvac-modes
                hvac_modes:
                  - 'off'
                  - cool
                  - heat
                  - fan_only
                  - dry
                  - auto
            name: RDC
          - type: thermostat
            entity: climate.gainable_etg
            show_current_as_primary: false
            features:
              - type: climate-fan-modes
                style: dropdown
                fan_modes:
                  - Quiet
                  - low
                  - medium
                  - high
                  - auto
              - type: climate-hvac-modes
                hvac_modes:
                  - 'off'
                  - cool
                  - heat
                  - fan_only
                  - dry
                  - auto
            name: ETG
        columns: 2
      - square: true
        type: grid
        cards:
          - type: entities
            entities:
              - entity: binary_sensor.tuya_porte_entree_iaszone
                secondary_info: last-updated
                icon: mdi:door
                name: Entrée
              - entity: binary_sensor.tuya_porte_garage_iaszone
                secondary_info: last-updated
                name: Escalier
                icon: mdi:door
              - entity: binary_sensor.tz3000_oxslv1c9_ts0203_iaszone
                name: Potager
                secondary_info: last-updated
                icon: mdi:window-closed-variant
              - entity: binary_sensor.tuya_salon2_iaszone_2
                name: Salon
                secondary_info: last-updated
                icon: mdi:window-closed-variant
              - entity: binary_sensor.tuya_salon3_iaszone_2
                name: Terrasse
                secondary_info: last-updated
                icon: mdi:window-closed-variant
            title: Capteurs de portes
            state_color: true
            show_header_toggle: false
          - type: vertical-stack
            cards:
              - type: tile
                entity: binary_sensor.shelly_uni_channel_1_input
                name: Portail
                icon: mdi:gate
                show_entity_picture: false
                tap_action:
                  action: call-service
                  service: script.portail
                  target: {}
                icon_tap_action:
                  action: call-service
                  service: script.portail
                  target: {}
                vertical: false
              - type: tile
                entity: binary_sensor.tuya_garage_droit_iaszone
                name: Garage Droit
                icon: mdi:garage-variant
                show_entity_picture: false
                tap_action:
                  action: call-service
                  service: script.garage_droit
                  target: {}
                icon_tap_action:
                  action: call-service
                  service: script.garage_droit
                  target: {}
                vertical: false
              - type: tile
                entity: binary_sensor.tuya_garage_gauche_iaszone
                name: Garage Gauche
                icon: mdi:garage-variant
                show_entity_picture: false
                tap_action:
                  action: call-service
                  service: script.garage_gauche
                  target: {}
                icon_tap_action:
                  action: call-service
                  service: script.garage_gauche
                  target: {}
                vertical: false
              - type: tile
                entity: switch.shelly_piscine
                name: Piscine Pompe
                icon: mdi:pool
                show_entity_picture: false
                tap_action:
                  action: toggle
                icon_tap_action:
                  action: toggle
                vertical: false
        columns: 2
      - square: true
        type: grid
        cards:
          - type: entities
            entities:
              - entity: input_boolean.enable_ouverture_portail_photo
                name: Portail
                secondary_info: none
                icon: mdi:gate
              - entity: input_boolean.enable_ouverture_garage_photo
                name: Garages
                icon: mdi:garage
              - entity: input_boolean.enable_notification_capteurs
                name: Capteurs
                icon: mdi:motion-sensor
              - entity: input_boolean.enable_notification_frigate
                name: Vidéo
                icon: mdi:video
            state_color: true
            title: Alertes
            show_header_toggle: false
          - type: entities
            entities:
              - entity: input_button.salon_bouton
                name: Salon
                secondary_info: none
              - entity: switch.shelly_lum_1
                name: Garage
              - entity: switch.shelly_lum_2
                name: Cellier
                secondary_info: none
            state_color: true
            show_header_toggle: false
            title: Lumières
        columns: 2

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

ouafnico commented 3 months ago

After disabling temporary the block "camera_view", it seems there is no memory leak anymore.

image

mhentschke commented 2 weeks ago

Having cameras in picture cards has very similar effects on my setup and it is even worse in Firefox. I can easily get to 5GB of RAM usage with it. Chrome is also affected but a little less usage. Could not find a fix for this as of yet.

kev-is-coding-for-adn commented 2 days ago

I'm affecting by this problem also. It appears with cards like "tailwindcss-card" and "mini-graph-card" that I needed to replace otherwise my Chromium will crash after only few hours.