home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.94k stars 29.03k forks source link

HA randomly restarting #95326

Closed MihaiKrieger closed 6 months ago

MihaiKrieger commented 1 year ago

The problem

My Home assistant is restarting at random points in time. Mostly I have noticed it being in the morning, but it could only be a coincidence, because the time stamps are not consistent. The machine running HA-OS is not rebooting nor loses power, only HA core is restarting. This has been happening for the past two weeks, inconsistently. Two weeks ago I had once day 2 restarts, the next day one, and than no restart for a week, when it happened again today morning. I am attaching the logs, as I am not able to pin-point a cause. For me it looks like some kind of code execution loop that leads the HA Core to crash. Any help or recommendation would be helpful

What version of Home Assistant Core has the issue?

core-2023.6.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-06-27 08:26:32.678 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:26:48.112 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:27:04.964 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:27:49.590 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:28:07.856 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:28:25.776 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:28:43.704 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:29:08.525 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-06-27 08:29:32.154 ERROR (MainThread) [custom_components.tapo.common_setup] Error fetching tapo data: Unexpected exception: 
2023-06-27 08:29:44.779 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
2023-06-27 08:30:00.623 ERROR (MainThread) [custom_components.tapo.common_setup] Error fetching tapo data: Unexpected exception: 
2023-06-27 08:30:09.196 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:10
2023-06-27 08:30:51.994 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:10
2023-06-27 08:30:59.628 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.printer_uptime is taking over 10 seconds
2023-06-27 08:30:59.631 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.page_count is taking over 10 seconds
2023-06-27 08:30:59.631 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prncplmsg is taking over 10 seconds
2023-06-27 08:30:59.632 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prntonerlvl is taking over 10 seconds
2023-06-27 08:30:59.632 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prntonercap is taking over 10 seconds
2023-06-27 08:30:59.642 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching Robby data
2023-06-27 08:31:19.837 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-06-27 08:31:47.085 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.dkn_inside_temperature is taking over 10 seconds
2023-06-27 08:31:47.086 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.office_tv is taking over 10 seconds
2023-06-27 08:31:47.087 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-06-27 08:31:47.118 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:10
2023-06-27 08:32:04.971 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.printer_uptime is taking over 10 seconds
2023-06-27 08:32:04.977 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.page_count is taking over 10 seconds
2023-06-27 08:32:04.980 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prncplmsg is taking over 10 seconds
2023-06-27 08:32:04.981 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prntonerlvl is taking over 10 seconds
2023-06-27 08:32:04.983 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prntonercap is taking over 10 seconds
2023-06-27 08:32:05.027 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin_residential sensor took longer than the scheduled update interval 0:00:30
2023-06-27 08:32:05.029 ERROR (MainThread) [homeassistant.components.airly] Timeout fetching airly data
2023-06-27 08:32:05.033 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /os/info request
2023-06-27 08:32:05.042 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /core/info request
2023-06-27 08:32:05.043 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/info request
2023-06-27 08:32:05.044 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /host/info request
2023-06-27 08:32:05.045 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /store request
2023-06-27 08:32:05.046 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /info request
2023-06-27 08:32:25.784 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hass_db_size is taking over 10 seconds
2023-06-27 08:32:25.786 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.dkn_streamer is taking over 10 seconds
2023-06-27 08:32:25.786 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.cvmfc is taking over 10 seconds
2023-06-27 08:32:25.793 WARNING (MainThread) [homeassistant.helpers.entity] Update of plant.golden_pothos is taking over 10 seconds
2023-06-27 08:32:25.795 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-06-27 08:32:25.796 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.office_tv is taking over 10 seconds
2023-06-27 08:32:25.800 ERROR (MainThread) [homeassistant.components.upnp] Error fetching Synology SRM data: Unable to communicate with IGD at: http://192.168.1.1:44783/rootDesc.xml
2023-06-27 08:32:25.862 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:10
2023-06-27 08:32:51.885 WARNING (MainThread) [homeassistant.components.hassio] Can't read Supervisor data: 
2023-06-27 08:33:25.290 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-06-27 08:33:25.292 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.office_tv is taking over 10 seconds
2023-06-27 08:33:25.293 WARNING (MainThread) [homeassistant.helpers.entity] Update of plant.golden_pothos is taking over 10 seconds
2023-06-27 08:33:25.331 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/info request
2023-06-27 08:33:25.334 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /os/info request
2023-06-27 08:33:25.336 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/stats request
2023-06-27 08:33:25.338 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /core/info request
2023-06-27 08:33:25.340 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /core/stats request
2023-06-27 08:33:25.342 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /info request
2023-06-27 08:34:11.962 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hass_db_size is taking over 10 seconds
2023-06-27 08:34:11.964 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.dkn_streamer is taking over 10 seconds
2023-06-27 08:34:11.965 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.cvmfc is taking over 10 seconds
2023-06-27 08:34:12.050 WARNING (MainThread) [homeassistant.components.sensor] Updating sun sensor took longer than the scheduled update interval 0:00:30
2023-06-27 08:35:22.163 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-06-27 08:35:22.165 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.office_tv is taking over 10 seconds
2023-06-27 08:35:22.167 WARNING (MainThread) [homeassistant.helpers.entity] Update of plant.golden_pothos is taking over 10 seconds
2023-06-27 08:35:22.168 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.dkn is taking over 10 seconds
2023-06-27 08:35:22.206 ERROR (MainThread) [homeassistant.components.hassio] Error fetching hassio data: Error on Supervisor API: 
2023-06-27 08:35:22.246 ERROR (MainThread) [homeassistant.components.esphome.dashboard] Error requesting ESPHome Dashboard data: Server disconnected
2023-06-27 08:35:22.268 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:10
2023-06-27 08:35:22.284 WARNING (MainThread) [homeassistant.components.number] Updating plant number took longer than the scheduled update interval 0:00:30
2023-06-27 08:35:22.295 WARNING (MainThread) [homeassistant.components.sensor] Updating plant sensor took longer than the scheduled update interval 0:00:30
2023-06-27 08:35:22.302 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin_residential sensor took longer than the scheduled update interval 0:00:30
2023-06-27 08:37:22.348 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.dkn_inside_temperature is taking over 10 seconds
2023-06-27 08:37:22.352 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.printer_uptime is taking over 10 seconds
2023-06-27 08:37:22.355 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.page_count is taking over 10 seconds
2023-06-27 08:37:22.357 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prncplmsg is taking over 10 seconds
2023-06-27 08:37:22.359 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prntonerlvl is taking over 10 seconds
2023-06-27 08:37:22.361 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.prntonercap is taking over 10 seconds
2023-06-27 08:37:22.363 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.hass_db_size is taking over 10 seconds
2023-06-27 08:37:22.365 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.cvmfc is taking over 10 seconds
2023-06-27 08:37:22.445 WARNING (MainThread) [homeassistant.components.climate] Updating daikin_residential climate took longer than the scheduled update interval 0:01:00
2023-06-27 08:37:22.447 WARNING (MainThread) [aioesphomeapi.connection] esp32-bluetooth-proxy-b4dd4c @ 192.168.0.25: Connection error occurred: [Errno 32] Broken pipe
2023-06-27 08:37:22.642 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-06-27 08:37:22.644 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.office_tv is taking over 10 seconds
2023-06-27 08:37:22.647 WARNING (MainThread) [homeassistant.helpers.entity] Update of plant.golden_pothos is taking over 10 seconds
2023-06-27 08:37:22.667 WARNING (MainThread) [ld2410_ble.ld2410_ble] 8E:1F:2A:06:F7:0C: Device unexpectedly disconnected; RSSI: -69
2023-06-27 08:37:22.673 WARNING (MainThread) [ld2410_ble.ld2410_ble] HLK-LD2410B_7BEE: Device unexpectedly disconnected; RSSI: -84
2023-06-27 08:37:22.677 WARNING (MainThread) [ld2410_ble.ld2410_ble] 36:F5:E5:0D:FF:89: Device unexpectedly disconnected; RSSI: -74
2023-06-27 08:37:22.764 WARNING (MainThread) [homeassistant.components.sensor] Updating snmp sensor took longer than the scheduled update interval 0:00:10
2023-06-27 08:37:22.766 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin_residential sensor took longer than the scheduled update interval 0:00:30
2023-06-27 08:37:23.729 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f6245810>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fba03b1c9a0>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.760 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f6113010>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fb9f0f9c9a0>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.771 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f6112a50>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fb9ef257d80>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.774 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f6112490>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fb9ef257ec0>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.784 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f6111bd0>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fb9ef290040>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.791 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f6110a90>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fb9ef290180>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.795 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener _FilterableJob(job=<Job onetime listen homeassistant_stop <bound method TuyaLocalDevice.async_stop of <custom_components.tuya_local.device.TuyaLocalDevice object at 0x7fb9f60c1c10>> HassJobType.Callback <function TuyaLocalDevice.async_stop at 0x7fb9ef2902c0>>, event_filter=None, run_immediately=False)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1195, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'homeassistant_stop'
2023-06-27 08:37:23.863 WARNING (MainThread) [custom_components.tuya_local.device] Kitchen Shutter receive loop has terminated
2023-06-27 08:37:23.866 WARNING (MainThread) [custom_components.tuya_local.device] Living Room Shutter receive loop has terminated
2023-06-27 08:37:23.868 WARNING (MainThread) [custom_components.tuya_local.device] Energy Meter Local receive loop has terminated
2023-06-27 08:37:23.953 WARNING (MainThread) [custom_components.tuya_local.device] Aroma Diffuser receive loop has terminated
2023-06-27 08:37:23.955 WARNING (MainThread) [custom_components.tuya_local.device] Bedroom Shutter receive loop has terminated
2023-06-27 08:37:23.957 WARNING (MainThread) [custom_components.tuya_local.device] Office Shutter receive loop has terminated
2023-06-27 08:37:23.958 WARNING (MainThread) [custom_components.tuya_local.device] Baby Room Shutter receive loop has terminated
2023-06-27 08:37:25.939 ERROR (Thread-11) [pychromecast.socket_client] [Office Balcony speaker(192.168.0.216):8009] Failed to connect. No retries.
2023-06-27 08:37:27.244 ERROR (Thread-21) [pychromecast.socket_client] [Chromecastushu(192.168.0.117):8009] Failed to connect. No retries.
2023-06-27 08:37:32.098 ERROR (Thread-87 (_thread_main)) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
    return self._handle_publish()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
    self._handle_on_message(message)
  File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
    on_message(self, self._userdata, message)
  File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 147, in _on_message
    listener(msg_dict)
  File "/usr/local/lib/python3.11/site-packages/tuya_iot/device.py", line 172, in on_message
    self._on_device_report(data["devId"], data["status"])
  File "/usr/local/lib/python3.11/site-packages/tuya_iot/device.py", line 191, in _on_device_report
    self.__update_device(device)
  File "/usr/local/lib/python3.11/site-packages/tuya_iot/device.py", line 178, in __update_device
    listener.update_device(device)
  File "/usr/src/homeassistant/homeassistant/components/tuya/__init__.py", line 260, in update_device
    dispatcher_send(self.hass, f"{TUYA_HA_SIGNAL_UPDATE_ENTITY}_{device.id}")
  File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 62, in dispatcher_send
    hass.loop.call_soon_threadsafe(async_dispatcher_send, hass, signal, *args)
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 806, in call_soon_threadsafe
    self._check_closed()
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Additional information

The logs are starting from the moment I have noticed there is a problem. Here is the full version attached, exported from HA home-assistant.log

marcelveldt commented 1 year ago

Try running HA for a couple of days with the custom components disabled. If that keeps running, start enabling them one by one. If it keeps crashing with the custom components disabled, we need to do more investigation.

PropaneDragon commented 1 year ago

Just want to add that I am also facing this issue, but I'm not sure whether it's exactly related. Nothing has changed other than the update so I suspect an add-on is broken to some extent.

HA seems to work perfect for a bit, then gradually slow down until it either recovers or just restarts itself.

I will try pad this out over the next few days with logs and findings, but I'm just putting in my observations for now.

Update: Found some issues with ui-lovelace-minimalist so I removed it and it also seemed that HAOS needs more than 4GB of memory now so I upped it to 6 and that seems to have stabilised things a little.

MihaiKrieger commented 1 year ago

Short update from my side: I have disabled a suspicious (possibly faulty) bluetooth device and since then I haven't had this problem anymore. The integration was an official one ( LD2410BLE ). I am keeping an eye out and come back with news.

PropaneDragon commented 1 year ago

I also want to update that I think in my case it was a new dashboard I had made that was polling too many entities at once and overwhelming the server. It probably shouldn't be able to do that but it's easily mitigated.

Will update if I find it to be anything else.

JudgeFredd commented 10 months ago

I have this exact same problem, but when i disable Tuya integration (normal Tuya, not Local Tuya), the restarts stop. Don't know if this is Tuya related or (tuya) device related.. The last post in my logs before restart, is like this: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/threading.py", line 975, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/usr/local/lib/python3.11/site-packages/tuya_iot/openmq.py", line 147, in _on_message listener(msg_dict) File "/usr/local/lib/python3.11/site-packages/tuya_iot/device.py", line 172, in on_message self._on_device_report(data["devId"], data["status"]) File "/usr/local/lib/python3.11/site-packages/tuya_iot/device.py", line 191, in _on_device_report self.update_device(device) File "/usr/local/lib/python3.11/site-packages/tuya_iot/device.py", line 178, in update_device listener.update_device(device) File "/usr/src/homeassistant/homeassistant/components/tuya/init.py", line 256, in update_device dispatcher_send(self.hass, f"{TUYA_HA_SIGNAL_UPDATEENTITY}{device.id}") File "/usr/src/homeassistant/homeassistant/helpers/dispatcher.py", line 62, in dispatcher_send hass.loop.call_soon_threadsafe(async_dispatcher_send, hass, signal, args) File "/usr/local/lib/python3.11/asyncio/base_events.py", line 806, in call_soon_threadsafe self._check_closed() File "/usr/local/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.