Open thargy opened 9 months ago
My HA has been stable for over 24hrs after removing the Hue bridge lights from AL control.
After reading this, I now have found my memory issue. I have 64gb allocated to HA, so it takes a while between restarts to have an effect.
I've been getting a lot of lockups (and restarts) too but I'm running HA OS. I'm using Deconz to control Zigbee lights, so a similar situation. Here is my error log, if it helps...
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:146
First occurred: 8:10:20 PM (9 occurrences)
Last logged: 8:58:49 PM
Error doing job: Exception in callback <_asyncio.TaskStepMethWrapper object at 0x7feefea9c400>()
Error doing job: Exception in callback <_asyncio.TaskStepMethWrapper object at 0x7feef01bdc90>()
Error doing job: Exception in callback <_asyncio.TaskStepMethWrapper object at 0x7feefeb39660>()
Error doing job: Exception in callback <_asyncio.TaskStepMethWrapper object at 0x7feeeee70340>()
Error doing job: Exception in callback <_asyncio.TaskStepMethWrapper object at 0x7feeeee71f60>()
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='listen state_changed' coro=<AdaptiveLightingManager.state_changed_event_listener() running at /config/custom_components/adaptive_lighting/switch.py:2299> cb=[set.remove()]> while another task <Task pending name="event trigger {'domain': 'automation', 'name': 'Update Vacuum Map Extractor camera', 'home_assistant_start': True, 'variables': {'this': {'entity_id': 'automation.update_vacuum_map_extractor_camera', 'state': 'on', 'attributes': {'id': '1700269046245', 'last_triggered': datetime.datetime(2024, 4, 10, 17, 7, 50, 826984, tzinfo=datetime.timezone.utc), 'mode': 'parallel', 'current': 0, 'max': 10, 'friendly_name': 'Update Vacuum Map Extractor camera'}, 'last_changed': '2024-04-11T10:01:16.282475+00:00', 'last_reported': '2024-04-11T10:01:16.282506+00:00', 'last_updated': '2024-04-11T10:01:16.282475+00:00', 'context': {'id': '01HV69NEQT5F0Q5XTN5C6VHX96', 'parent_id': None, 'user_id': None}}}, 'trigger_data': {'id': 'state_changed', 'idx': '0', 'alias': None}}" coro=<AutomationEntity.async_trigger() running at /usr/src/homeassistant/homeassistant/components/automation/__init__.py:673>> is being executed.
Home Assistant Adaptive Lighting Issue Template
Bug Reports
If you need help with using or configuring Adaptive Lighting, please open a Q&A discussion thread here instead.
Before submitting a bug report, please follow these troubleshooting steps:
Please confirm that you have completed the following steps:
Required information for bug reports:
Please include the following information in your issue.
Issues missing this information may not be addressed.
The logs do not show anything substantial due to nothing being written because of memory pressure, instead, here is the dump from
py_spy
:Also, you can access the sampling svg's from here, which are the most illuminating: Rate 100 Rate 200
(If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting): Can post on request, however over >150 devices and 2 separate z2m servers!
Describe the bug and how to reproduce it: With thee above config, the memory usage would continue to grow until HA would hang within about 10 minutes.
The dump & SVG, show that adaptive lighting is running, and that most time is spent in the hue bridge integration trying to turn lights on.
The hue bridge currently only has a few lights, all in the "Snug" area, changing the lights of that area to
[]
(see config above) fixed the problem, confirming the issue was with adaptive lights spam calling hue bridge. During one crash cycle, I managed to disable the hue bridge and caught logs being spammed with failures to access hue bridge, sadly I could not capture that trace due to the issues around constant crash cycling.Note First raised this on the community before confirming issue was with interaction of adaptive lights and hue bridge.