HA repeatedly crashing every few hours, suspected memory leak

Hi all, I’ve been lurking in the forums for a long time and normally always find the solution to any problem here but this time I’ve searched high and low and I’m really struggling to find a solution, or where to start even! My setup is very unstable at this stage, so I’m desperate to get things back on track once again.

Here is my setup:
VirtualBox Ubuntu VM, running on a windows 10 i7 PC
Setup in accordance with these instructions.
On the latest version - 0.113.3

Ever since updating Home Assistant to 0.113.3 it keeps slowing down to the point of being unusable every few hours, it gets to the point where I cant even access the server control to restart it, I have to wait until it gets so bad it completely crashes and reboots itself, and that’s generally when I’m not using it. If I go into the Dashboard through the web GUI it normally dies within a few minutes of poking around, making things hard to diagnose.

Looking at the log in VM terminal around the time of it fully crashing it reads:

Out of memory: Killed processes 26975 (java)

So that’s why I suspect it could be a memory leak but I really don’t know, I’m just an enthusiast and not a developer (not yet, at least).

I found a similar sounding issue here but it doesn’t look like a solution was clear and the integrations they mention aren’t ones that I am using. Any one else reporting similar issues normally had a Rpi setup and would relate to the SD card, which obviously doesn’t apply in my case.

Here is my most recent log from HA:

2020-08-11 18:10:46 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating octoprint binary_sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:10:47 WARNING (MainThread) [homeassistant.components.sensor] Updating shelly sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:10:47 WARNING (MainThread) [homeassistant.components.zone] Updating zone zone took longer than the scheduled update interval 0:00:15
2020-08-11 18:10:48 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ender_3_job_percentage is taking over 10 seconds
2020-08-11 18:10:48 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.ender_3_printing_error is taking over 10 seconds
2020-08-11 18:10:49 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.lounge_tv is taking over 10 seconds
2020-08-11 18:10:50 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.garden_plinthlights is taking over 10 seconds
2020-08-11 18:10:51 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.wifi_garden_plinthlightscurcon_shelly is taking over 10 seconds
2020-08-11 18:10:54 WARNING (MainThread) [aiohttp.websocket] websocket connection is closing.
2020-08-11 18:11:14 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:11:20 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.tv_time_this_week is taking over 10 seconds
2020-08-11 18:11:26 WARNING (MainThread) [homeassistant.components.sensor] Updating history_stats sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:11:26 WARNING (MainThread) [homeassistant.components.sensor] Updating shelly sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:11:26 WARNING (MainThread) [homeassistant.components.switch] Updating doorbird switch took longer than the scheduled update interval 0:00:30
2020-08-11 18:11:27 WARNING (MainThread) [homeassistant.components.media_player] Updating ps4 media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:11:27 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:11:27 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:11:28 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.adguard_dns_queries is taking over 10 seconds
2020-08-11 18:11:28 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.adguard_safe_browsing_blocked is taking over 10 seconds
2020-08-11 18:11:29 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.adguard_parental_control_blocked is taking over 10 seconds
2020-08-11 18:11:30 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.adguard_dns_queries_blocked_ratio is taking over 10 seconds
2020-08-11 18:11:30 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.adguard_protection is taking over 10 seconds
2020-08-11 18:11:36 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:11:36 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:11:42 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.adguard_safe_searches_enforced is taking over 10 seconds
2020-08-11 18:11:42 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.adguard_average_processing_speed is taking over 10 seconds
2020-08-11 18:11:46 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.adguard_filtering is taking over 10 seconds
2020-08-11 18:11:47 INFO (MainThread) [backoff] Backing off call_api(...) for 0.1s (aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.github.com:443 ssl:None [Try again])
2020-08-11 18:11:53 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:12:09 WARNING (MainThread) [homeassistant.components.sensor] Updating octoprint sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:12:12 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating octoprint binary_sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:12:16 WARNING (MainThread) [homeassistant.components.sensor] Updating shelly sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:12:17 WARNING (MainThread) [homeassistant.components.media_player] Updating ps4 media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:12:19 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:12:20 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:12:26 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.adguard_parental_control is taking over 10 seconds
2020-08-11 18:12:28 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.lounge_tv is taking over 10 seconds
2020-08-11 18:12:30 WARNING (MainThread) [homeassistant.helpers.entity] Update of light.kitchen_light is taking over 10 seconds
2020-08-11 18:12:30 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.garden_plinthlights is taking over 10 seconds
2020-08-11 18:12:31 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.wifi_garden_plinthlightstotcon_shelly is taking over 10 seconds
2020-08-11 18:12:34 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:12:35 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:12:41 INFO (MainThread) [backoff] Backing off call_api(...) for 1.4s (asyncio.exceptions.TimeoutError)
2020-08-11 18:12:42 WARNING (MainThread) [homeassistant.components.sensor] Updating history_stats sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:12:43 WARNING (MainThread) [homeassistant.components.sensor] Updating shelly sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:12:45 WARNING (MainThread) [homeassistant.components.switch] Updating doorbird switch took longer than the scheduled update interval 0:00:30
2020-08-11 18:12:45 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.tv_time_this_week is taking over 10 seconds
2020-08-11 18:12:57 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:13:00 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:13:38 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.adguard_safe_browsing is taking over 10 seconds
2020-08-11 18:15:25 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ender_3_current_state is taking over 10 seconds
2020-08-11 18:15:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.ender_3_printing is taking over 10 seconds
2020-08-11 18:16:06 WARNING (MainThread) [homeassistant.helpers.entity] Update of light.lounge_light is taking over 10 seconds
2020-08-11 18:16:50 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.tadobridge_portable_humidity_thermostat (<class 'homeassistant.components.tado.sensor.TadoZoneSensor'>) took 0.464 seconds. Please create a bug report at https://github.com/home-assistant/home-assistant/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tado%22
2020-08-11 18:17:15 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for climate.orangery_radiatorvalve (<class 'homeassistant.components.tado.climate.TadoClimate'>) took 0.519 seconds. Please create a bug report at https://github.com/home-assistant/home-assistant/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tado%22
2020-08-11 18:17:23 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.wifi_kitchen_lighttotcon_shelly (<class 'custom_components.shelly.sensor.ShellyInfoSensor'>) took 0.551 seconds. Please report it to the custom component author.
2020-08-11 18:17:30 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.wifi_lounge_lightcurcon_shelly (<class 'custom_components.shelly.sensor.ShellySensor'>) took 0.425 seconds. Please report it to the custom component author.
2020-08-11 18:17:44 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.wifi_lounge_lighttotcon_shelly (<class 'custom_components.shelly.sensor.ShellyInfoSensor'>) took 1.314 seconds. Please report it to the custom component author.
2020-08-11 18:19:06 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.tadobridge_lounge_temperature_radiatorvalve (<class 'homeassistant.components.tado.sensor.TadoZoneSensor'>) took 0.524 seconds. Please create a bug report at https://github.com/home-assistant/home-assistant/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tado%22
2020-08-11 18:19:16 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for climate.lounge_radiatorvalve (<class 'homeassistant.components.tado.climate.TadoClimate'>) took 0.434 seconds. Please create a bug report at https://github.com/home-assistant/home-assistant/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tado%22
2020-08-11 18:21:07 WARNING (MainThread) [homeassistant.components.media_player] Updating ps4 media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:21:29 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:21:52 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:22:19 WARNING (MainThread) [homeassistant.components.zone] Updating zone zone took longer than the scheduled update interval 0:00:15
2020-08-11 18:22:27 WARNING (MainThread) [homeassistant.components.sensor] Updating octoprint sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:22:40 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating octoprint binary_sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:22:56 WARNING (MainThread) [homeassistant.components.sensor] Updating shelly sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:25:15 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.garden_plinthlights is taking over 10 seconds
2020-08-11 18:25:29 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.wifi_garden_plinthlightstotcon_shelly is taking over 10 seconds
2020-08-11 18:26:46 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for climate.backbedroom_radiatorvalve (<class 'homeassistant.components.tado.climate.TadoClimate'>) took 0.981 seconds. Please create a bug report at https://github.com/home-assistant/home-assistant/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+tado%22
2020-08-11 18:28:29 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.wifi_kitchen_lightcurcon_shelly (<class 'custom_components.shelly.sensor.ShellySensor'>) took 0.584 seconds. Please report it to the custom component author.
2020-08-11 18:33:11 WARNING (Thread-2) [homeassistant.components.mqtt] Disconnected from MQTT server core-mosquitto:1883 (1)
2020-08-11 18:33:12 INFO (MainThread) [backoff] Backing off call_api(...) for 2.2s (asyncio.exceptions.TimeoutError)
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.adguard_safe_search is taking over 10 seconds
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.helpers.entity] Update of light.lounge_light is taking over 10 seconds
2020-08-11 18:33:12 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 309, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f84ac40b1c0>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw&grant_type=refresh_token&scope=home.user&refresh_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicGFydG5lciJdLCJzdWIiOiI1ZGUzYmE5NWRjMGU4MjAwMGI5YjhjMDMiLCJuYmYiOjE1OTcxNjU1MzQsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJnZW9yZ2VAY3VsZmYuY28udWsiLCJhdGkiOiI0ODZmODhmYy0wY2M4LTQzNmEtOTEyMS04MTYxNTdmN2Y4ZjciLCJpc3MiOiJ0YWRvIiwiZXhwIjoxNTk5NzU3NTMzLCJpYXQiOjE1OTcxNjU1MzQsInRhZG9fY2xpZW50X2lkIjoicHVibGljLWFwaS1wcmV2aWV3IiwianRpIjoiY2M2MmYxY2YtMmJkYy00OTQ4LWE4NjAtNTM3ODYwOTgwMGYxIn0.AGDg3_9NX_PP40SJgELvmjtYS3MiXkVbxlSjhXPlUiZyYxJP2YbT-d2V9SdBVBg-tL4mzm3LwigQNXusrw4se5ri7Qs8DZTaH41-UWGoM7a6_iRo1TYqdDTA_ReN3GKYCrzm9xprb1rmn_YmkavnxQNdRDqQJP11HiW12IvZ4HkObDYspAyW7G4k67uwwb_551JuF5twS62oxdIkTxk1XAksKSzDt2QqIH2r2FIfi4_CKetYE8AV3K3O40EZRfGJyBz2s3lM1bVfBbHyvsrd9O5I_7Hu_HinBDZoW6RIYb1cMNyD9GfpNazCPfj0FcrYWIk4vyeusgP-9CW__slrvg (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f84ac40b1c0>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 103, in <lambda>
    hass, lambda now: tadoconnector.update(), SCAN_INTERVAL,
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 194, in update
    self.update_sensor("device", device["id"])
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 203, in update_sensor
    devices_data = self.tado.getDevices()
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 163, in getDevices
    data = self._apiCall(cmd)
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 60, in _apiCall
    self._refresh_token()
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 119, in _refresh_token
    response = self._http_session.request("post", url, params=data, timeout=self.timeout, data=json.dumps({}).encode('utf8'),
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw&grant_type=refresh_token&scope=home.user&refresh_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicGFydG5lciJdLCJzdWIiOiI1ZGUzYmE5NWRjMGU4MjAwMGI5YjhjMDMiLCJuYmYiOjE1OTcxNjU1MzQsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJnZW9yZ2VAY3VsZmYuY28udWsiLCJhdGkiOiI0ODZmODhmYy0wY2M4LTQzNmEtOTEyMS04MTYxNTdmN2Y4ZjciLCJpc3MiOiJ0YWRvIiwiZXhwIjoxNTk5NzU3NTMzLCJpYXQiOjE1OTcxNjU1MzQsInRhZG9fY2xpZW50X2lkIjoicHVibGljLWFwaS1wcmV2aWV3IiwianRpIjoiY2M2MmYxY2YtMmJkYy00OTQ4LWE4NjAtNTM3ODYwOTgwMGYxIn0.AGDg3_9NX_PP40SJgELvmjtYS3MiXkVbxlSjhXPlUiZyYxJP2YbT-d2V9SdBVBg-tL4mzm3LwigQNXusrw4se5ri7Qs8DZTaH41-UWGoM7a6_iRo1TYqdDTA_ReN3GKYCrzm9xprb1rmn_YmkavnxQNdRDqQJP11HiW12IvZ4HkObDYspAyW7G4k67uwwb_551JuF5twS62oxdIkTxk1XAksKSzDt2QqIH2r2FIfi4_CKetYE8AV3K3O40EZRfGJyBz2s3lM1bVfBbHyvsrd9O5I_7Hu_HinBDZoW6RIYb1cMNyD9GfpNazCPfj0FcrYWIk4vyeusgP-9CW__slrvg (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f84ac40b1c0>: Failed to establish a new connection: [Errno -3] Try again'))
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.sensor] Updating octoprint sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.sensor] Updating hacs sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating octoprint binary_sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.sensor] Updating history_stats sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.sensor] Updating shelly sensor took longer than the scheduled update interval 0:00:30
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.switch] Updating doorbird switch took longer than the scheduled update interval 0:00:30
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.media_player] Updating ps4 media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.switch] Updating adguard switch took longer than the scheduled update interval 0:00:10
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ender_3_job_percentage is taking over 10 seconds
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.ender_3_printing_error is taking over 10 seconds
2020-08-11 18:33:12 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 309, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 171, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f84ad9b2490>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw&grant_type=refresh_token&scope=home.user&refresh_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicGFydG5lciJdLCJzdWIiOiI1ZGUzYmE5NWRjMGU4MjAwMGI5YjhjMDMiLCJuYmYiOjE1OTcxNjU1MzQsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJnZW9yZ2VAY3VsZmYuY28udWsiLCJhdGkiOiI0ODZmODhmYy0wY2M4LTQzNmEtOTEyMS04MTYxNTdmN2Y4ZjciLCJpc3MiOiJ0YWRvIiwiZXhwIjoxNTk5NzU3NTMzLCJpYXQiOjE1OTcxNjU1MzQsInRhZG9fY2xpZW50X2lkIjoicHVibGljLWFwaS1wcmV2aWV3IiwianRpIjoiY2M2MmYxY2YtMmJkYy00OTQ4LWE4NjAtNTM3ODYwOTgwMGYxIn0.AGDg3_9NX_PP40SJgELvmjtYS3MiXkVbxlSjhXPlUiZyYxJP2YbT-d2V9SdBVBg-tL4mzm3LwigQNXusrw4se5ri7Qs8DZTaH41-UWGoM7a6_iRo1TYqdDTA_ReN3GKYCrzm9xprb1rmn_YmkavnxQNdRDqQJP11HiW12IvZ4HkObDYspAyW7G4k67uwwb_551JuF5twS62oxdIkTxk1XAksKSzDt2QqIH2r2FIfi4_CKetYE8AV3K3O40EZRfGJyBz2s3lM1bVfBbHyvsrd9O5I_7Hu_HinBDZoW6RIYb1cMNyD9GfpNazCPfj0FcrYWIk4vyeusgP-9CW__slrvg (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f84ad9b2490>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 103, in <lambda>
    hass, lambda now: tadoconnector.update(), SCAN_INTERVAL,
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 192, in update
    self.update_sensor("zone", zone["id"])
  File "/usr/src/homeassistant/homeassistant/components/tado/__init__.py", line 201, in update_sensor
    data = self.tado.getZoneState(sensor)
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 176, in getZoneState
    return TadoZone(self.getState(zone), zone)
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 183, in getState
    data = self._apiCall(cmd)
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 60, in _apiCall
    self._refresh_token()
  File "/usr/local/lib/python3.8/site-packages/PyTado/interface.py", line 119, in _refresh_token
    response = self._http_session.request("post", url, params=data, timeout=self.timeout, data=json.dumps({}).encode('utf8'),
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw&grant_type=refresh_token&scope=home.user&refresh_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicGFydG5lciJdLCJzdWIiOiI1ZGUzYmE5NWRjMGU4MjAwMGI5YjhjMDMiLCJuYmYiOjE1OTcxNjU1MzQsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJnZW9yZ2VAY3VsZmYuY28udWsiLCJhdGkiOiI0ODZmODhmYy0wY2M4LTQzNmEtOTEyMS04MTYxNTdmN2Y4ZjciLCJpc3MiOiJ0YWRvIiwiZXhwIjoxNTk5NzU3NTMzLCJpYXQiOjE1OTcxNjU1MzQsInRhZG9fY2xpZW50X2lkIjoicHVibGljLWFwaS1wcmV2aWV3IiwianRpIjoiY2M2MmYxY2YtMmJkYy00OTQ4LWE4NjAtNTM3ODYwOTgwMGYxIn0.AGDg3_9NX_PP40SJgELvmjtYS3MiXkVbxlSjhXPlUiZyYxJP2YbT-d2V9SdBVBg-tL4mzm3LwigQNXusrw4se5ri7Qs8DZTaH41-UWGoM7a6_iRo1TYqdDTA_ReN3GKYCrzm9xprb1rmn_YmkavnxQNdRDqQJP11HiW12IvZ4HkObDYspAyW7G4k67uwwb_551JuF5twS62oxdIkTxk1XAksKSzDt2QqIH2r2FIfi4_CKetYE8AV3K3O40EZRfGJyBz2s3lM1bVfBbHyvsrd9O5I_7Hu_HinBDZoW6RIYb1cMNyD9GfpNazCPfj0FcrYWIk4vyeusgP-9CW__slrvg (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f84ad9b2490>: Failed to establish a new connection: [Errno -3] Try again'))
2020-08-11 18:33:12 ERROR (MainThread) [frontend.js.latest.202007160] http://192.168.1.152:8123/frontend_latest/chunk.cf565e41b8a8dce0642a.js:133:238 Uncaught TypeError: Cannot read property 'header' of null
2020-08-11 18:33:12 ERROR (MainThread) [frontend.js.latest.202007160] http://192.168.1.152:8123/frontend_latest/chunk.cf565e41b8a8dce0642a.js:133:238 Uncaught TypeError: Cannot read property 'header' of null
2020-08-11 18:33:12 ERROR (MainThread) [frontend.js.latest.202007160] http://192.168.1.152:8123/frontend_latest/chunk.cf565e41b8a8dce0642a.js:133:238 Uncaught TypeError: Cannot read property 'header' of null
2020-08-11 18:33:12 ERROR (MainThread) [frontend.js.latest.202007160] http://192.168.1.152:8123/frontend_latest/chunk.cf565e41b8a8dce0642a.js:133:238 Uncaught TypeError: Cannot read property 'header' of null
2020-08-11 18:33:12 ERROR (MainThread) [frontend.js.latest.202007160] http://192.168.1.152:8123/frontend_latest/chunk.cf565e41b8a8dce0642a.js:133:238 Uncaught TypeError: Cannot read property 'header' of null
2020-08-11 18:33:12 ERROR (MainThread) [frontend.js.latest.202007160] http://192.168.1.152:8123/frontend_latest/chunk.cf565e41b8a8dce0642a.js:133:238 Uncaught TypeError: Cannot read property 'header' of null
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.zone] Updating zone zone took longer than the scheduled update interval 0:00:15
2020-08-11 18:33:12 WARNING (MainThread) [homeassistant.components.sensor] Updating adguard sensor took longer than the scheduled update interval 0:05:00
2020-08-11 18:37:12 WARNING (SyncWorker_1) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "sensor". Check lines 121 and 128

If anyone has any ideas on how to solve this or can point me in the right direction to dig deeper it would be hugely appreciated :slight_smile:

Thanks, G

I think things may be better and that an outdated community integration was causing an issue.

After updating everything including HACS itself, things seem to be better and I haven’t experienced a full on crash. I’ve also setup memory and CPU monitoring charts, which I didn’t have before. Things appear to seem pretty consistent, with some random bouncing around:

I will be keeping an eye on it but I’m concerned that my VM maybe doesn’t have enough memory allocated to it, does anyone with a similar setup have a recommendation? I’ve currently allocated 1GB to the VM - out of an 8GB total.

I’m pretty sure I’ve got an active memory leak :frowning: