Hey! For many days I am struggling with HA crashes at random times. I am running an official HA VM on Proxmox along with other VMs. The hardware I use is an old laptop with gen3 Intel i3 CPU and 16GB of RAM, RAID 1 (mirroring) on two SATA SSD drives via ZFS. I do not think it is a hardware issue since HA is the only VM that stops. Memory utilization is 1.3/4GB assigned. I tried to increase RAM to 6-8GB but saw no difference.
When I inspect the logs from the previous HA run I always see at the end recorder entries:
2023-06-02 11:32:08.690 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: CommitTask()
2023-06-02 11:32:17.643 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: KeepAliveTask()
2023-06-02 11:32:17.644 DEBUG (Recorder) [homeassistant.components.recorder.core] Sending keepalive
2023-06-02 11:32:17.927 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=binary_sensor.presence_biuro, old_state=<state binary_sensor.presence_biuro=on; on=True, temperature=28.0, device_class=motion, friendly_name=Biuro Presence @ 2023-06-02T11:29:22.273111+02:00>, new_state=<state binary_sensor.presence_biuro=off; on=True, temperature=28.0, device_class=motion, friendly_name=Biuro Presence @ 2023-06-02T11:32:17.926436+02:00>>)
2023-06-02 11:32:18.278 INFO (MainThread) [homeassistant.components.recorder] Backup end notification, releasing write lock
2023-06-02 11:32:18.279 DEBUG (MainThread) [homeassistant.components.recorder.core] Not a SQLite database or not connected, unlocking not necessary
2023-06-02 11:32:22.728 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=binary_sensor.presence_przedpokoj, old_state=<state binary_sensor.presence_przedpokoj=on; on=True, temperature=29.0, device_class=motion, friendly_name=Motion Sensor Przedpokoj @ 2023-06-02T11:30:52.533289+02:00>, new_state=<state binary_sensor.presence_przedpokoj=off; on=True, temperature=29.0, device_class=motion, friendly_name=Motion Sensor Przedpokoj @ 2023-06-02T11:32:22.726803+02:00>>)
2023-06-02 11:32:27.016 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.salon_lywsdcgq_humidity, old_state=<state sensor.salon_lywsdcgq_humidity=48.2; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Salon (LYWSDCGQ) Humidity @ 2023-06-02T11:30:28.720501+02:00>, new_state=<state sensor.salon_lywsdcgq_humidity=48.3; state_class=measurement, unit_of_measurement=%, device_class=humidity, friendly_name=Salon (LYWSDCGQ) Humidity @ 2023-06-02T11:32:27.015008+02:00>>)
2023-06-02 11:32:28.692 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: CommitTask()
2023-06-02 11:32:29.930 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.temperature_humidity_sensor_biuro_temperature, old_state=<state sensor.temperature_humidity_sensor_biuro_temperature=23.4; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Biuro (LYWSDCGQ) Temperature @ 2023-06-02T11:30:59.008882+02:00>, new_state=<state sensor.temperature_humidity_sensor_biuro_temperature=23.5; state_class=measurement, unit_of_measurement=°C, device_class=temperature, friendly_name=Biuro (LYWSDCGQ) Temperature @ 2023-06-02T11:32:29.212672+02:00>>)
The log does not contain any meaningful errors that could give me a hint of what is wrong.
When this issue started appearing I thought my SQLite db couldn’t keep up with the number of state changes, therefore I migrated to MariaDB using the official addon. That reduced the frequency of crashes but did not eliminate the problem. What I tried since then is to reduce the number of entities I record. My current config:
recorder.yaml
db_url: !secret mariadb_url
purge_keep_days: 30
commit_interval: 20
include:
domains:
- light
- scene
- automation
- binary_sensor
- script
entities:
- device_tracker.galaxy_s20_fe
- switch.piec_gazowy_ogrzewanie
- remote.tv
entity_globs:
- sensor.*temperature*
- sensor.*humidity*
- sensor.*energy*
- sensor.*presence*
- sensor.*termostat*
- sensor.*x3_m40i*
influxdb.yaml
host: 192.168.1.2
port: 8086
api_version: 1
database: home_assistant
ssl: false
username: !secret influxdb_user
password: !secret influxdb_pass
exclude: #Exclude entities
domains:
- automation
- binary_sensor
- button
- script
- calendar
- device_tracker
- media_player
- persistent_notification
- select
- update
- zone
entity_globs:
- sensor.shellypro3em_*
I know that you will not guess what is the reason for the crashes but I would like to ask you what you think I can try in order to further investigate or solve this issue. Thank you in advance.