2024.5+: Tracking down instability issues caused by integrations

If you find your system unstable because of a misbehaving integration, there are a few methods for identifying and recovering from the problem.

It is recommended to use Home Assistant’s built-in debug mode in conjunction with asyncio debug mode.

Using Home Assistant's built-in debug mode in 2024.5.x or later (preferred)

If you are using version 2024.5.x or later, Home Assistant has a built-in debug mode:
https://www.home-assistant.io/docs/configuration/troubleshooting/#handling-unexpected-restarts-or-crashes

Note that debug mode is not a valid option for versions older than 2024.5.x and will cause the system to fail to validate the configuration when added.

  1. Add the following to configuration.yaml, and restart.
# Example configuration.yaml entry
homeassistant:
  debug: true
  1. Download and post logs with any RuntimeError in a GitHub issue

Home Assistant debug mode has ~1% performance cost.

Enabling asyncio debug mode at run time (preferred)

If the system is coming up ok, and you have already enabled Home Assistant debug mode (or you are using a version older than 2024.5.x), but you find that you are getting unexpected restarts:

  1. Install profiler integration Link to Integrations: add integration – My Home Assistant
  2. Enable asyncio debug service as soon as possible after startup Profiler - Home Assistant
  3. Watch logs for RuntimeError: Non-thread-safe operation
  4. Download and post logs with full trace in a GitHub issue

asyncio debug mode has ~10% performance cost.

Enabling asyncio debug mode before startup (fallback plan)

If you cannot get the system to start, you can enable debugpy (https://www.home-assistant.io/integrations/debugpy/), which enables asyncio debug.

# Example configuration.yaml entry
debugpy:

debugpy has ~40% performance cost and should not be used long term.

Manually enabling safe mode (last resort)

This is an advanced topic of last resort.

If you cannot get the system to start at all, you can manually enable safe mode.

  1. Enable port 22222 using https://developers.home-assistant.io/docs/operating-system/debugging/
  2. Connect to ssh over port 22222
  3. Run the following: ha core restart --safe-mode

As a last resort, if you cannot get core to restart you can do an forced restart with
docker restart homeassistant&

Integration blocking startup
  1. Enable debug logs for the setup and bootstrap process:
# Example configuration.yaml entries
logger:
  default: info
  logs:
    homeassistant.bootstrap: debug
    homeassistant.setup: debug
    homeassistant.loader: debug
    homeassistant.config_entries: debug
  1. Restart
  2. Download logs and check for tasks that are delaying startup
Sluggish performance or increased CPU usage

If the system’s response is sluggish or you observe increased CPU usage, the profiler integration can generate a callgrind file that can help determine the root cause.

  1. Install profiler integration Link to Integrations: add integration – My Home Assistant
  2. Start the profiler for using the profiler.start service Link to Developer tools: call service – My Home Assistant
  3. Check the persistent notifications area for a link to the callgrind.out.XXXX file
  4. Download the callgrind.out.XXXX file and open it in qcachegrind using the instructions in the profiler documentation.
Finding a run-away template
  1. Install profiler integration Link to Integrations: add integration – My Home Assistant
  2. Call the profiler dump_log_objects service Link to Developer tools: call service – My Home Assistant with:
service: profiler.dump_log_objects
data:
  type: RenderInfo

Download the logs and look for lines with RenderInfo:
<RenderInfo Template<template=({{ ((states('sensor.energy_usage') | float(default=0)) + (states('sensor.energy_usage_2') | float(default=0))) / 1000 }}) renders=8> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.energy_usage_2', 'sensor.energy_usage'}) rate_limit=None has_time=False exception=None is_static=False>

Look for anything with a very high number of renders. In the example above its quite low with renders=8

Tracking down a memory leak of python objects
  1. Install profiler integration Link to Integrations: add integration – My Home Assistant
  2. Call the profiler start_log_objects service
    Link to Developer tools: call service – My Home Assistant with the default interval of 30s
  3. Let the logger run for about an hour
  4. Call the profiler stop_log_objects service Link to Developer tools: call service – My Home Assistant
  5. Download the logs and look for object counts that are still growing at the end of the log.
  6. If you are unsure what the object is, call the profiler dump_log_objects service Link to Developer tools: call service – My Home Assistant with:
service: profiler.dump_log_objects
data:
  type: LeakingObjectNameHere

The Home Assistant Cookbook - Index.

26 Likes

@bdraco any definition of how many renders is considered too many? :sweat_smile:

Also, thank you for the detailed information.

I’m facing a memory leak, and couldn’t find yet the culprit.

Starting to go over your suggestions.
And I have already implement a security measure until finding the culprit to force a restart if consumption is above 60%.

depends on the timeframe and template. Post both if you can

here is a log looking for the run-away templates I just extracted one of them. I can share the full log if needed.

  {{ states('weather.ipma_weather_daily') }}
{% elif states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_pouring') | float %}
  pouring
{% elif states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_rainy') | float %}
  rainy
{% elif states('sensor.home_weather_station_rain_rate') | float > 0 %}
  light-rain
{% elif states('sensor.home_weather_station_uv_index') | float > 3 and states('sensor.home_weather_station_solar_radiation') | float > 200 %}
  sunny
{% elif states('sensor.home_weather_station_relative_pressure') | float < 1005 and states('sensor.home_weather_station_humidity') | float > 85  and is_state('sun.sun', 'below_horizon') %}
  cloudy
{% elif states('sensor.home_weather_station_solar_radiation') | float > 10 and 
states('sensor.home_weather_station_solar_radiation') | float <= 100 and 
states('sensor.home_weather_station_uv_index') | float <= 3 %}
  cloudy
{% elif states('sensor.home_weather_station_solar_radiation') | float > 100 and states('sensor.home_weather_station_uv_index') | float <= 3 %}
  partly-cloudy
{% elif states('sensor.home_weather_station_wind_speed') | float > 40 and states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_rainy') | float %}
  stormy
{% elif states('sensor.home_weather_station_wind_speed') | float > 40 %}
  windy
{% elif states('sensor.home_weather_station_uv_index') | float <= 1 and states('sensor.home_weather_station_solar_radiation') | float < 100 and is_state('sun.sun', 'below_horizon') %}
  clear-night
{% else %}
  {{ states('weather.ipma_weather_daily') }}
{% endif %}) renders=132> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sun.sun', 'sensor.home_weather_station_uv_index', 'input_number.rain_rate_rainy', 'sensor.home_weather_station_relative_pressure', 'input_boolean.weather_stations_is_installed', 'input_number.rain_rate_pouring', 'sensor.home_weather_station_rain_rate', 'sensor.home_weather_station_humidity'}) rate_limit=None has_time=False exception=None is_static=False>
2024-10-19 23:05:41.681 CRITICAL (SyncWorker_21) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({% if states('input_boolean.weather_stations_is_installed') == 'off' %}
  {{ states('weather.ipma_weather_daily') }}
{% elif states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_pouring') | float %}
  pouring
{% elif states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_rainy') | float %}
  rainy
{% elif states('sensor.home_weather_station_rain_rate') | float > 0 %}
  light-rain
{% elif states('sensor.home_weather_station_uv_index') | float > 3 and states('sensor.home_weather_station_solar_radiation') | float > 200 %}
  sunny
{% elif states('sensor.home_weather_station_relative_pressure') | float < 1005 and states('sensor.home_weather_station_humidity') | float > 85  and is_state('sun.sun', 'below_horizon') %}
  cloudy
{% elif states('sensor.home_weather_station_solar_radiation') | float > 10 and 
states('sensor.home_weather_station_solar_radiation') | float <= 100 and 
states('sensor.home_weather_station_uv_index') | float <= 3 %}
  cloudy
{% elif states('sensor.home_weather_station_solar_radiation') | float > 100 and states('sensor.home_weather_station_uv_index') | float <= 3 %}
  partly-cloudy
{% elif states('sensor.home_weather_station_wind_speed') | float > 40 and states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_rainy') | float %}
  stormy
{% elif states('sensor.home_weather_station_wind_speed') | float > 40 %}
  windy
{% elif states('sensor.home_weather_station_uv_index') | float <= 1 and states('sensor.home_weather_station_solar_radiation') | float < 100 and is_state('sun.sun', 'below_horizon') %}
  clear-night
{% else %}
  {{ states('weather.ipma_weather_daily') }}
{% endif %}) renders=132> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sun.sun', 'sensor.home_weather_station_uv_index', 'input_number.rain_rate_rainy', 'sensor.home_weather_station_relative_pressure', 'input_boolean.weather_stations_is_installed', 'input_number.rain_rate_pouring', 'sensor.home_weather_station_rain_rate', 'sensor.home_weather_station_humidity'}) rate_limit=None has_time=False exception=None is_static=False>

How long did you let this run for? 132 is not really high if you had it run for 24 hours.

Ohh, that is the execution of the profiler.dump_log_objects, which doesn’t take time.
I’m now running the profiler.start_log_objects.

Does the profiler.dump_log_objects counts renders since restart?

I would assume so. BDraco can say otherwise, but the templates you posted aren’t really “run away” unless the source sensors are updating like crazy.

1 Like

It shows renders since restart

2 Likes

Just run the log objects on step 6. This was the result. I do see some growth, but not sure if it is that bad.

Part 1

2024-10-22 16:19:38.439 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: int got invalid input 'None' when rendering template '{{ (state_attr("sensor.cardigos_weather", "epoch") | default(as_timestamp(now())) | int) | timestamp_local }}' but no default was specified') while processing template 'Template<template=({{ (state_attr("sensor.cardigos_weather", "epoch") | default(as_timestamp(now())) | int) | timestamp_local }}) renders=180>' for attribute '_attr_native_value' in entity 'sensor.cardigos_epoch'
2024-10-22 16:21:25.619 CRITICAL (SyncWorker_51) [homeassistant.components.profiler] Memory Growth: [('dict', 314719, 314719), ('list', 236010, 236010), ('tuple', 149513, 149513), ('function', 132207, 132207), ('cell', 73161, 73161), ('ReferenceType', 32155, 32155), ('set', 18853, 18853), ('type', 16003, 16003), ('NodeStrClass', 15931, 15931), ('method', 14792, 14792), ('getset_descriptor', 12955, 12955), ('builtin_function_or_method', 11846, 11846), ('property', 9667, 9667), ('deque', 7974, 7974), ('ReadOnlyDict', 7710, 7710), ('Context', 7451, 7451), ('TraceElement', 7005, 7005), ('partial', 6949, 6949), ('frozenset', 6810, 6810), ('RLock', 6223, 6223), ('MutexValue', 6096, 6096), ('module', 6065, 6065), ('ModuleSpec', 6037, 6037), ('SourceFileLoader', 5723, 5723), ('HassJob', 5560, 5560), ('ZCLAttributeDef', 5344, 5344), ('Schema', 4702, 4702), ('Gauge', 4507, 4507), ('member_descriptor', 4496, 4496), ('wrapper_descriptor', 4218, 4218), ('_lru_cache_wrapper', 4132, 4132), ('method_descriptor', 3914, 3914), ('State', 3828, 3828), ('Field', 3749, 3749), ('uint8_t', 3527, 3527), ('NodeDictClass', 3217, 3217), ('staticmethod', 2990, 2990), ('uint16_t', 2709, 2709), ('RestoredTrace', 2688, 2688), ('StructField', 2524, 2524), ('classmethod', 2477, 2477), ('cython_function_or_method', 2338, 2338), ('Point', 2320, 2320), ('RegistryEntry', 2257, 2257), ('_GenericAlias', 2250, 2250), ('Optional', 2014, 2014), ('_abc_data', 1979, 1979), ('Event', 1948, 1948), ('_UnionGenericAlias', 1692, 1692), ('Counter', 1673, 1673), ('PosixPath', 1648, 1648), ('ForwardRef', 1615, 1615), ('Template', 1519, 1519), ('RepositoryData', 1446, 1446), ('RepositoryContent', 1446, 1446), ('RepositoryPath', 1446, 1446), ('Validate', 1446, 1446), ('RepositoryReleases', 1446, 1446), ('HacsManifest', 1446, 1446), ('defaultdict', 1430, 1430), ('ZCLCommandDef', 1401, 1401), ('Parameter', 1321, 1321), ('ABCMeta', 1303, 1303), ('Required', 1288, 1288), ('_tuplegetter', 1254, 1254), ('Struct', 1038, 1038), ('HacsIntegrationRepository', 1037, 1037), ('Lock', 974, 974), ('itemgetter', 952, 952), ('DDLEventsDispatch', 946, 946), ('EnumType', 940, 940), ('_ColumnMetrics', 928, 928), ('EntitySubscription', 923, 923), ('attrgetter', 889, 889), ('Subscription', 883, 883), ('HassLogger', 882, 882), ('mappingproxy', 863, 863), ('Attribute', 861, 861), ('FileFinder', 827, 827), ('Param', 824, 824), ('GenericAlias', 778, 778), ('Pattern', 768, 768), ('StoredState', 756, 756), ('_DataclassParams', 754, 754), ('Column', 752, 752), ('Command', 725, 725), ('ClusterId', 715, 715), ('ListSubclass', 695, 695), ('TypeVar', 687, 687), ('EntityPlatform', 686, 686), ('All', 685, 685), ('TemplateState', 674, 674), ('quoted_name', 619, 619), ('CaseInsensitiveDict', 590, 590), ('NodeListClass', 568, 568), ('uint32_t', 554, 554), ('fused_cython_function', 537, 537), ('TimerHandle', 526, 526), ('EntryPoint', 518, 518), ('IterableMemberMeta', 515, 515), ('cached_property', 513, 513), ('EntityLoader', 480, 480), ('Forecast_Location', 425, 425), ('CommandHeader', 417, 417), ('immutabledict', 408, 408), ('BindParameter', 405, 405), ('UnionType', 398, 398), ('_CallableGenericAlias', 379, 379), ('_IntEnumMeta', 376, 376), ('MQTTDiscoveryPayload', 364, 364), ('ABCCachedProperties', 355, 355), ('Any', 351, 351), ('OrderedSet', 343, 343), ('MiniProduction', 341, 341), ('Node', 338, 338), ('RestoredExtraData', 337, 337), ('TasmotaSensor', 330, 330), ('Descriptor', 327, 327), ('HacsPluginRepository', 324, 324), ('MessageMeta', 324, 324), ('Comparator', 315, 315), ('Service', 315, 315), ('DeprecatedConstantEnum', 314, 314), ('KeyedRef', 308, 308), ('PointerType', 304, 304), ('RemovedRepository', 301, 301), ('AttributeEventToken', 285, 285), ('BinaryExpression', 284, 284), ('VARCHAR2', 277, 277), ('PropertyId', 270, 270), ('Base', 268, 268), ('_TypedDictMeta', 265, 265), ('coroutine', 265, 265), ('MovedAttribute', 264, 264), ('DeviceEntry', 258, 258), ('Status', 254, 254), ('ExtensionFileLoader', 253, 253), ('OrderedDict', 248, 248), ('CommandDef', 248, 248), ('_ProtocolMeta', 243, 243), ('ResourceRoute', 240, 240), ('SplitResult', 238, 238), ('lock', 236, 236), ('Logger', 236, 236), ('_EmptyListener', 236, 236), ('Coerce', 232, 232), ('SignalDict', 230, 230), ('EcoWittMapping', 229, 229), ('_TrackPointUTCTime', 226, 226), ('MqttValueTemplate', 223, 223), ('PathDistribution', 223, 223), ('CField', 218, 218), ('Signature', 218, 218), ('Enum', 217, 217), ('TemplateStateFromEntityId', 216, 216), ('CType', 215, 215), ('SensorDeviceClass', 212, 212), ('Station', 211, 211), ('CachedProperty', 205, 205), ('hamt_bitmap_node', 200, 200), ('hamt', 197, 197), ('AnnotatedColumn', 191, 191), ('Debouncer', 191, 191), ('CIMultiDict', 183, 183), ('Style', 183, 183), ('ConfigEntry', 181, 181), ('PlaceHolder', 179, 179), ('Packet_metaclass', 176, 176), ('Integration', 175, 175), ('ResultColumnsEntry', 172, 172), ('CIMultiDictProxy', 170, 170), ('_memoized_property', 169, 169), ('traceback', 165, 165), ('ExposedEntity', 162, 162), ('ByteField', 156, 156), ('AutomationTrace', 153, 153), ('WeakKeyDictionary', 149, 149), ('RGBColor', 149, 149), ('_anonymous_label', 149, 149), ('CStructField', 149, 149), ('TagInfo', 147, 147), ('Field_metaclass', 146, 146), ('NumberDeviceClass', 145, 145), ('EmberStatus', 143, 143), ('OsalNvIds', 143, 143), ('MatchRule', 142, 142), ('_truncated_label', 141, 141), ('_ColumnsPlusNames', 141, 141), ('uint1_t', 140, 140), ('In', 139, 139), ('MovedModule', 138, 138), ('Future', 138, 138), ('DPToAttributeMapping', 137, 137), ('AlwaysCreateEnumType', 136, 136), ('NWK', 136, 136), ('EventListener', 136, 136), ('StgDict', 135, 135), ('Script', 135, 135), ('_LiteralGenericAlias', 132, 132), ('DeletedRegistryEntry', 132, 132), ('__pyx_scope_struct____init__', 131, 131), ('TasmotaSensorConfig', 130, 130), ('_OneTimeListener', 129, 129), ('Select', 129, 129), ('PackedUInt21', 128, 128), ('HassKey', 126, 126), ('FunctionPtrType', 123, 123), ('Units', 123, 123), ('DedupeColumnCollection', 122, 122), ('sl_Status', 122, 122), ('frame', 119, 119), ('InstrumentedAttribute', 117, 117), ('Input', 117, 117), ('IppOperation', 117, 117), ('Condition', 116, 116), ('_ListenerCollection', 116, 116), ('Range', 115, 115), ('URL', 114, 114), ('ClusterPersistingListener', 114, 114), ('BinarySensorDeviceClass', 113, 113), ('method-wrapper', 112, 112), ('ColumnProperty', 110, 110), ('PhysicalEnvironment', 108, 108), ('classmethod_descriptor', 106, 106), ('Remove', 106, 106), ('BatteryNotesSensorEntityDescription', 105, 105), ('_ClsLevelDispatch', 104, 104), ('PropertyID', 104, 104), ('ReceiveMessage', 104, 104), ('TypeAliasType', 103, 103), ('ByteEnumField', 103, 103), ('BluetoothServiceInfoBleak', 100, 100), ('_ResourceConfig', 100, 100), ('ShellyDevice', 99, 99), ('DmapTag', 98, 98), ('portable_instancemethod', 97, 97), ('UtilityMeterSensor', 97, 97), ('slice', 96, 96), ('AttributeEventsDispatch', 96, 96), ('OperationMode', 96, 96), ('FrozenOrThawed', 95, 95), ('uint3_t', 94, 94), ('BitField', 94, 94), ('SensorEntityDescription', 93, 93), ('Property', 92, 92), ('BLEDevice', 92, 92), ('DeviceType', 91, 91), ('ColumnLoader', 90, 90), ('ScalarAttributeImpl', 90, 90), ('KwargTypeMeta', 90, 90), ('ReadOnlyColumnCollection', 88, 88), ('CodeBuilder', 88, 88), ('CodeLines', 88, 88), ('GPIOMeta', 88, 88), ('CachedIPv4Address', 88, 88), ('NUMBER', 86, 86), ('__pyx_scope_struct_1_flag_property', 85, 85), ('_ScopedIP', 84, 84), ('RdataType', 82, 82), ('Factory', 81, 81), ('PyWrapper', 80, 80), ('_TokenType', 80, 80), ('RpcSensorDescription', 80, 80), ('RpcBinarySensor', 80, 80), ('__pyx_scope_struct_1___init__', 79, 79), ('Task', 78, 78), ('HacsThemeRepository', 78, 78), ('EzspStatus', 77, 77), ('_NamedIntConstant', 76, 76), ('_FuncPtr', 76, 76), ('memoized_attribute', 75, 75), ('BooleanClauseList', 73, 73), ('NV3KeyId', 72, 72), ('_TypedField', 71, 71), ('_non_memoized_property', 71, 71), ('Label', 71, 71), ('PropRegistry', 71, 71), ('RegisteredOption', 71, 71), ('TasmotaStatusSensor', 70, 70), ('TasmotaStatusSensorConfig', 70, 70), ('NodeType', 69, 69), ('Thread', 69, 69), ('LinkModeBit', 69, 69), ('IPv6Address', 67, 67), ('PlainResource', 67, 67), ('StorageStyle', 67, 67), ('Empty', 67, 67), ('prefix_anon_map', 66, 66), ('Forecast', 66, 66), ('HomeKitDiscoveredIntegration', 65, 65), ('SignatureType', 65, 65), ('FeatureName', 65, 65), ('ASFStorageStyle', 65, 65), ('ModemStatus', 64, 64), ('MQTTMatcher', 64, 64), ('DeviceGroupMeta', 63, 63), ('EzspValueId', 63, 63), ('IppStatus', 63, 63), ('HTTPStatus', 62, 62), ('DiscoveryKey', 62, 62), ('ZDOCmd', 62, 62), ('_CommandID', 62, 62), ('TempDegreesC', 62, 62), ('codes', 62, 62), ('Exclusive', 61, 61), ('EUI64', 61, 61), ('Platform', 60, 60), ('MediaPlayerEntityFeature', 60, 60), ('_MultipleClassMarker', 60, 60), ('socket', 60, 60), ('ClusterHandlerInfo', 60, 60), ('ClusterInfo', 60, 60), ('ErrorType', 59, 59), ('ShortField', 59, 59), ('IPField', 58, 58), ('builtin_method', 57, 57), ('FutureIter', 57, 57), ('MqttSensor', 57, 57), ('IPv4Address', 56, 56), ('DataTypeId', 56, 56), ('DataType', 56, 56), ('DataTypeInfo', 56, 56), ('ObservedRule', 56, 56), ('XShortField', 56, 56), ('CachedIPv6Address', 56, 56), ('PopulateDict', 54, 54), ('Handle', 54, 54), ('AddrModeAddress', 54, 54), ('SchemaFlowFormStep', 53, 53), ('SelectorKey', 53, 53), ('MediaField', 53, 53), ('Flags', 52, 52), ('EntityReference', 52, 52), ('EntityData', 52, 52), ('_ORMColumnEntity', 51, 51), ('EzspConfigId', 51, 51), ('Coord', 51, 51), ('AutomationEntity', 51, 51), ('Boolean', 50, 50), ('symbol', 49, 49), ('JSONObjectWithFieldsMeta', 48, 48), ('EntityComponent', 48, 48), ('default_compile_options', 48, 48), ('RpcSensor', 48, 48), ('MP4StorageStyle', 47, 47), ('Block', 46, 46), ('BaseSensorDescription', 46, 46), ('Table', 45, 45), ('PrimaryKeyConstraint', 45, 45), ('OID', 45, 45), ('CacheKey', 45, 45), ('TransportSocket', 45, 45), ('EcoWittSensor', 45, 45), ('ParamSpec', 44, 44), ('TypeVarTuple', 44, 44), ('TextSelector', 44, 44), ('MySQLCompiler_mysqldb', 44, 44), ('XiaomiMiioSensorDescription', 44, 44), ('ColumnCollection', 43, 43), ('ZeroconfIPv4Address', 43, 43), ('IppTag', 43, 43), ('IPv6Network', 42, 42), ('Store', 42, 42), ('UnitOfInformation', 42, 42), ('PyCStructType', 42, 42), ('LimitedSizeDict', 42, 42), ('BlockSensor', 42, 42), ('_SpecialGenericAlias', 41, 41), ('reify', 41, 41), ('EmberCounterType', 41, 41), ('VirtualUtilityMeter', 41, 41), ('AirPlayFlags', 41, 41), ('DeprecatedConstant', 40, 40), ('String', 40, 40), ('SensorEntityInfo', 40, 40), ('InternalTraversal', 39, 39), ('NodeDescriptor', 39, 39), ('CursorResultMetaData', 38, 38), ('MACStatus', 38, 38), ('FieldLenField', 38, 38), ('Channels', 37, 37), ('BatteryNotesDevice', 37, 37), ('BatteryNotesCoordinator', 37, 37), ('EnumTypeWrapper', 37, 37), ('PlatformEntityIdentifiers', 37, 37), ('IntField', 37, 37), ('ForeignKey', 36, 36), ('_CustomCalendarType', 36, 36), ('BatteryNotesButton', 36, 36), ('BatteryNotesTypeSensor', 36, 36), ('BatteryNotesLastReplacedSensor', 36, 36), ('BatteryNotesButtonEntityDescription', 36, 36), ('WSMessage', 35, 35), ('Text', 35, 35), ('_DialectArgDict', 35, 35), ('DynamicResource', 35, 35), ('DNSAddress', 35, 35), ('Resource', 35, 35), ('TagSet', 35, 35), ('District', 35, 35), ('ColumnClause', 35, 35), ('_TLSAlertType', 34, 34), ('PyCPointerType', 34, 34), ('uint2_t', 34, 34), ('MqttCommandTemplate', 34, 34), ('IPv4Network', 33, 33), ('AddressFamily', 33, 33), ('Signals', 33, 33), ('_SelectorSocketTransport', 33, 33), ('BLEGAPType', 33, 33), ('FormatField', 33, 33), ('Statement', 33, 33), ('Negsignal', 33, 33), ('BatteryNotesBatteryPlusSensor', 33, 33), ('BatteryNotesBatteryLowSensor', 33, 33), ('BatteryNotesBinarySensorEntityDescription', 33, 33), ('SwitchBotSensor', 33, 33), ('AwesomeVersion', 32, 32), ('GPS', 32, 32), ('Semaphore', 32, 32), ('DNSNsec', 32, 32), ('PressurePascal', 32, 32), ('EzspDecisionId', 32, 32), ('CommandId', 32, 32), ('Subsystem', 32, 32), ('Endpoint', 32, 32), ('check_auth', 32, 32), ('ModelField', 32, 32), ('FieldInfo', 32, 32), ('BooleanSelector', 31, 31), ('InstanceState', 31, 31), ('SQLSchema', 31, 31), ('__pyx_scope_struct_7__generic_validator_basic', 31, 31), ('Length', 30, 30), ('_RelationshipArg', 30, 30), ('SimpleCookie', 30, 30), ('ErrorKey', 30, 30), ('OptionType', 30, 30), ('FanSpeed', 30, 30), ('EcoWittSensorTypes', 30, 30), ('HacsRepositoryUpdateEntity', 30, 30), ('ReolinkNumberEntityDescription', 30, 30), ('MobileAppSensor', 30, 30), ('ClimateEntityFeature', 29, 29), ('ColumnSet', 29, 29), ('_TrackTimeInterval', 29, 29), ('PictureType', 29, 29), ('PyCSimpleType', 28, 28), ('FromLinter', 28, 28), ('LambdaOptions', 28, 28), ('Tag', 28, 28), ('DeviceSelector', 28, 28), ('ReolinkNumberEntity', 28, 28), ('BlockSensorDescription', 28, 28), ('SensorInfo', 28, 28), ('SensorState', 28, 28), ('ConditionalField', 28, 28), ('BleakGATTCharacteristicESPHome', 28, 28), ('BluetoothGATTCharacteristic', 28, 28), ('Grouping', 28, 28), ('MP3DescStorageStyle', 28, 28), ('AlertDescription', 27, 27), ('UnitOfTime', 27, 27), ('UnitOfPressure', 27, 27), ('ColorMode', 27, 27), ('AnalyzedFunction', 27, 27), ('ZigbeePacket', 27, 27), ('SerializableBytes', 27, 27), ('Integer', 26, 26), ('_MaskedUnaryOperation', 26, 26), ('_frommethod', 26, 26), ('ORMSelectCompileState', 26, 26), ('IntegrationMatchHistory', 26, 26), ('EmberKeyStatus', 26, 26), ('DeviceState', 26, 26), ('ShellyEntryData', 26, 26), ('ConnectionOptions', 26, 26), ('_TrackUTCTimeChange', 26, 26), ('ScriptVariables', 26, 26), ('FlagValue', 26, 26), ('Subquery', 26, 26), ('MediaType', 25, 25), ('EntitySelector', 25, 25), ('Panel', 25, 25), ('_TrackStateChangeFiltered', 25, 25), ('TrackStates', 25, 25), ('EDECode', 25, 25), ('ShellyButton', 25, 25), ('EsphomeSensor', 25, 25), ('RenderInfo', 25, 25), ('IdentifierType', 24, 24), ('VacuumEntityFeature', 24, 24), ('Index', 24, 24), ('WeakSequence', 24, 24), ('Insert', 24, 24), ('ByteSpec', 24, 24), ('Option', 24, 24), ('LedBrightness', 24, 24), ('FrameType', 24, 24), ('uint6_t', 24, 24), ('ResponseId', 24, 24), ('frozendict', 24, 24), ('CommandID', 24, 24), ('CompatValidator', 24, 24), ('ActionSelector', 24, 24), ('BinarySensorEntityDescription', 24, 24), ('Steps', 24, 24), ('TrackTemplateResultInfo', 24, 24), ('KeyedRateLimit', 24, 24), ('TrackTemplate', 24, 24), ('IP6Field', 24, 24), ('BitEnumField', 24, 24), ('Options', 23, 23), ('SelectSelector', 23, 23), ('_AttributeOptions', 23, 23), ('ZeroconfIPv6Address', 23, 23), ('Latin1TextSpec', 23, 23), ('GenericLightingDeviceType', 23, 23), ('FlowLitersPerSec', 23, 23), ('Preset', 23, 23), ('Connection', 23, 23), ('Color', 23, 23), ('ExtendedPanId', 23, 23), ('SysMonitorSensorEntityDescription', 23, 23), ('NumberInfo', 23, 23), ('NumberState', 23, 23), ('EcowittSensorEntity', 23, 23), ('RegexFlag', 22, 22), ('_TLSMessageType', 22, 22), ('UnitOfDataRate', 22, 22), ('Inclusive', 22, 22), ('_ModuleMarker', 22, 22), ('_ModNS', 22, 22), ('Type', 22, 22), ('Capabilities', 22, 22), ('__pyx_scope_struct___create_binary_propagating_op', 22, 22), ('_TemplateAttribute', 22, 22), ('TypeDecl', 22, 22), ('StrLenField', 22, 22), ('UnitOfEnergy', 21, 21), ('UnitOfVolume', 21, 21), ('UnitOfMass', 21, 21), ('_DeprecatedValue', 21, 21), ('CoverEntityFeature', 21, 21), ('MappedColumn', 21, 21), ('LightSource', 21, 21), ('States', 21, 21), ('LogLevel', 21, 21), ('UpdateEntityFeature', 21, 21), ('_CollectionLifeCycle', 21, 21), ('WebSocketReader', 21, 21), ('FlowControlDataQueue', 21, 21), ('WebSocketWriter', 21, 21), ('Renamed', 21, 21), ('AllLEDEffectType', 21, 21), ('Device', 21, 21), ('Neighbor', 21, 21), ('ImageType', 21, 21), ('RequestDataValidator', 20, 20), ('CoverDeviceClass', 20, 20), ('FanEntityFeature', 20, 20), ('MediaClass', 20, 20), ('Alias', 20, 20), ('Cast', 20, 20), ('AnalyzedCode', 20, 20), ('DiagnosticsPlatformData', 20, 20), ('NWKStatus', 20, 20), ('GeneralCommand', 20, 20), ('EmberStackError', 20, 20), ('NetworkParameter', 20, 20), ('HttpStatusCode', 20, 20), ('HandshakeType', 20, 20), ('ConnectionInputs', 20, 20), ('SensorTemplate', 20, 20), ('Rcode', 20, 20), ('ScriptEntity', 20, 20), ('StrFixedLenField', 20, 20), ('AtomDataType', 20, 20), ('MP3StorageStyle', 20, 20), ('SimpleNamespace', 19, 19), ('count', 19, 19), ('_State', 19, 19), ('CHAR', 19, 19), ('SmallInteger', 19, 19), ('RuntimeConfig', 19, 19), ('StatementLambdaElement', 19, 19), ('EncodedTextSpec', 19, 19), ('SignatureTree', 19, 19), ('InputNumber', 19, 19), ('Flag', 19, 19), ('partialmethod', 19, 19), ('TXStatus', 19, 19), ('Sensor', 19, 19), ('Identify', 19, 19), ('StreamInputs', 19, 19), ('ContentDirectoryErrorCode', 19, 19), ('IppFinishing', 19, 19), ('HidCommand', 19, 19), ('_Precedence', 18, 18), ('SSLContext', 18, 18), ('Dialect', 18, 18), ('Registry', 18, 18), ('DeclarativeAttributeIntercept', 18, 18), ('_MaskedBinaryOperation', 18, 18), ('AreaEntry', 18, 18), ('__pyx_scope_struct__unpack_parser_factory', 18, 18), ('APSStatus', 18, 18), ('MeasurementType', 18, 18), ('NeoAlarmMelody', 18, 18), ('Box', 18, 18), ('Trigger', 18, 18), ('MqttDeviceTrigger', 18, 18), ('_RawColumnEntity', 18, 18), ('BufferFlags', 17, 17), ('MsgFlag', 17, 17), ('EventType', 17, 17), ('SignalType', 17, 17), ('BlockingCall', 17, 17), ('RawRequestMessage', 17, 17), ('custom_op', 17, 17), ('MTCapabilities', 17, 17), ('ABCBase', 17, 17), ('ConstraintsIntersection', 17, 17), ('ReolinkSwitchEntityDescription', 17, 17), ('MqttBinarySensor', 17, 17), ('ClauseList', 17, 17), ('ListStorageStyle', 17, 17), ('WeakValueDictionary', 16, 16), ('UnitOfLength', 16, 16), ('LRUCache', 16, 16), ('Backend', 16, 16), ('CallableProxyType', 16, 16), ('PyCArrayType', 16, 16), ('DictRemover', 16, 16), ('AutoPopulatedParam', 16, 16), ('LockState', 16, 16), ('InstanceEventsDispatch', 16, 16), ('MapperEventsDispatch', 16, 16), ('Identity', 16, 16), ('CategoryEntry', 16, 16), ('FreezableDefaultDict', 16, 16), ('RefreshToken', 16, 16), ('IDManager', 16, 16), ('HomeAssistantRequest', 16, 16), ('AlarmControlPanelEntityFeature', 16, 16), ('SizedIntegerSpec', 16, 16), ('EncodingSpec', 16, 16), ('BinaryDataSpec', 16, 16), ('_Rule', 16, 16), ('Cookie', 16, 16), ('OperationEvent', 16, 16), ('RegisteredTier', 16, 16), ('event', 16, 16), ('PDM_EVENT', 16, 16), ('Configuration', 16, 16), ('EndpointId', 16, 16), ('__pyx_scope_struct_1_apply_wraps', 16, 16), ('Basic', 16, 16), ('scputimes', 16, 16), ('ConnectionKey', 16, 16), ('_CacheHashWrapper', 16, 16), ('ResponseHandler', 16, 16), ('HttpResponseParser', 16, 16), ('Name', 16, 16), ('RpcShellySwitchAsLight', 16, 16), ('ShellyBlockEvent', 16, 16), ('Process', 16, 16), ('Decl', 16, 16), ('ReolinkButtonEntity', 16, 16), ('BasicClusterHandler', 16, 16), ('StrField', 16, 16), ('ShortEnumField', 16, 16), ('AnnotatedColumnClause', 16, 16), ('TlvValue', 16, 16), ('MP4ListStorageStyle', 16, 16), ('HVACAction', 15, 15), ('ClassManager', 15, 15), ('conv', 15, 15), ('Mapper', 15, 15), ('_ColumnMapping', 15, 15), ('DeletedDeviceEntry', 15, 15), ('InsertDMLState', 15, 15), ('SimpleResultMetaData', 15, 15), ('_CompileLabel', 15, 15), ('AdvertisementDataType', 15, 15), ('OperatingMode', 15, 15), ('AnalogInputType', 15, 15), ('ZoneType', 15, 15), ('EmberApsOption', 15, 15), ('AddressMode', 15, 15), ('ErrorCode', 15, 15), ('TimeoutIndex', 15, 15), ('BDBCommissioningStatus', 15, 15), ('CloseCode', 15, 15), ('Variable', 15, 15), ('HassClientResponse', 15, 15), ('RequestInfo', 15, 15), ('TimerContext', 15, 15), ('ControlType', 15, 15), ('Pages', 15, 15), ('ReolinkSwitchEntity', 15, 15), ('VoiceAssistantEventType', 15, 15), ('SwitchbotModel', 15, 15), ('PassiveBluetoothEntityKey', 15, 15), ('_SuperSocket_metaclass', 15, 15), ('ConstrainedNumberMeta', 15, 15), ('_SpecialForm', 14, 14), ('weekday', 14, 14), ('LightEntityFeature', 14, 14), ('HVACMode', 14, 14), ('ItemType', 14, 14), ('Signal', 14, 14), ('KeyData', 14, 14), ('ZCLAttributeAccess', 14, 14), ('PumpAlarmMask', 14, 14), ('EzspMfgTokenId', 14, 14), ('SirenEntityFeature', 14, 14), ('SESwitchAction', 14, 14), ('NpyDatetimeUnit', 14, 14), ('ZDO', 14, 14), ('Requests', 14, 14), ('WsRPC', 14, 14), ('SessionData', 14, 14), ('RpcDevice', 14, 14), ('ClientWebSocketResponse', 14, 14), ('ShellyRpcCoordinator', 14, 14), ('ShellyRpcPollingCoordinator', 14, 14), ('HTTPConnectionState', 14, 14), ('ErrorCodes', 14, 14), ('Commands', 14, 14), ('Events', 14, 14), ('TemplateSelector', 14, 14), ('LightColorCapability', 14, 14), ('BlockBinarySensorDescription', 14, 14), ('RpcUpdateEntity', 14, 14), ('TimeoutHandle', 14, 14), ('SupportedModels', 14, 14), ('ZDOClusterHandler', 14, 14), ('PowerConfigurationClusterHandler', 14, 14), ('Battery', 14, 14), ('ZHADeviceProxy', 14, 14), ('MP3ListDescStorageStyle', 14, 14), ('AdvertisementData', 14, 14), ('UnitOfSpeed', 13, 13), ('UUID', 13, 13), ('WSCloseCode', 13, 13), ('TextSelectorType', 13, 13), ('NullHandler', 13, 13), ('SensorStateClass', 13, 13), ('_convert2ma', 13, 13), ('Capability', 13, 13), ('StreamWriter', 13, 13), ('PipelineEventType', 13, 13), ('MultiDict', 13, 13), ('Direction', 13, 13), ('RouteStatus', 13, 13), ('AlarmMask', 13, 13), ('SystemMode', 13, 13), ('EzspPolicyId', 13, 13), ('CommandsMeta', 13, 13), ('SmartEnergyMeteringEntityDescription', 13, 13), ('SmartEnergySummationEntityDescription', 13, 13), ('ReplyCode', 13, 13), ('NumberSelector', 13, 13), ('FreqGroup', 13, 13), ('Relays', 13, 13), ('_Bit', 13, 13), ('EsphomeNumber', 13, 13), ('TasmotaSwitch', 13, 13), ('TasmotaRelay', 13, 13), ('TasmotaRelayConfig', 13, 13), ('TasmotaDiscoveryMsg', 13, 13), ('BleLockMethod', 13, 13), ('RSSISensor', 13, 13), ('LQISensor', 13, 13), ('IgdStateItem', 13, 13), ('DeviceModel', 13, 13), ('MediaControlCommand', 13, 13), ('UnitOfFrequency', 12, 12), ('UnitOfVolumeFlowRate', 12, 12), ('Month', 12, 12), ('PyCFuncPtrType', 12, 12), ('_ASN1Type', 12, 12), ('Interpolation', 12, 12), ('Clamp', 12, 12), ('dispatcher', 12, 12), ('_FunctionGenerator', 12, 12), ('HostFeature', 12, 12), ('AnnotatedTable', 12, 12), ('RequestHandler', 12, 12), ('AccessLogger', 12, 12), ('_SelectorDatagramTransport', 12, 12), ('ChargingState', 12, 12), ('RoidmiState', 12, 12), ('Blueprint', 12, 12), ('_SSLSocket', 12, 12), ('TransmitOptions', 12, 12), ('EmberInitialSecurityBitmask', 12, 12), ('CallbackSubsystem', 12, 12), ('Feature', 12, 12), ('MemoryBIO', 12, 12), ('BlockDevice', 12, 12), ('ShellyBlockCoordinator', 12, 12), ('ShellyRestCoordinator', 12, 12), ('DlnaOrgFlags', 12, 12), ('ReolinkNVRSwitchEntity', 12, 12), ('BlockBinarySensor', 12, 12), ('MqttSwitch', 12, 12), ('VirtualEnergySensor', 12, 12), ('_Left', 12, 12), ('FlagsField', 12, 12), ('MultipleTypeField', 12, 12), ('BleakGATTServiceESPHome', 12, 12), ('BluetoothGATTService', 12, 12), ('ListMediaField', 12, 12), ('Timeout', 11, 11), ('ParseState', 11, 11), ('ExactSequence', 11, 11), ('EndpointResolverBuiltins', 11, 11), ('MediaPlayerState', 11, 11), ('_TraceAdaptRole', 11, 11), ('DATE', 11, 11), ('APIEndpointSettings', 11, 11), ('Update', 11, 11), ('MatchFailedReason', 11, 11), ('MimeType', 11, 11), ('MultiDictProxy', 11, 11), ('DictStorageCollectionWebsocket', 11, 11), ('InputBoolean', 11, 11), ('CameraStatus', 11, 11), ('uint4_t', 11, 11), ('LockType', 11, 11), ('ManualOperatitonEventMask', 11, 11), ('Reliability', 11, 11), ('PanelStatus', 11, 11), ('SecurityManagerKeyType', 11, 11), ('AlarmState', 11, 11), ('DeviceInfo', 11, 11), ('DanfossSoftwareErrorCodeBitmap', 11, 11), ('InovelliFanLedScalingMode', 11, 11), ('DanfossControlAlgorithmScaleFactorEnum', 11, 11), ('GBLTagId', 11, 11), ('Opcode', 11, 11), ('ChimeToneEnum', 11, 11), ('HubToneEnum', 11, 11), ('cycle', 11, 11), ('Route', 11, 11), ('RebootReasons', 11, 11), ('SwitchbotDataUpdateCoordinator', 11, 11), ('SwitchbotDevice', 11, 11), ('VirtualPowerSensor', 11, 11), ('SourceEntity', 11, 11), ('IdentifyClusterHandler', 11, 11), ('IdentifyButton', 11, 11), ('CommandButtonEntityInfo', 11, 11), ('ZHAButton', 11, 11), ('PacketListField', 11, 11), ('BrowsableMedia', 11, 11), ('XIntField', 11, 11), ('ModelMetaclass', 11, 11), ('ClassAttribute', 11, 11), ('SwitchBotAdvertisement', 11, 11), ('_Feature', 10, 10), ('Encoding', 10, 10), ('memoryview', 10, 10), ('ECAlgorithm', 10, 10), ('ClientTimeout', 10, 10), ('EMachine', 10, 10), ('FoldedCase', 10, 10), ('ConfigErrorTranslationKey', 10, 10), ('ReasonFlags', 10, 10), ('methodcaller', 10, 10), ('ValidationStatus', 10, 10), ('PytestTester', 10, 10), ('RunVar', 10, 10), ('AddonState', 10, 10), ('LovelaceStorage', 10, 10), ('ReadOnlyProperties', 10, 10), ('SsdpDevice', 10, 10), ('GattCharacteristicsFlags', 10, 10), ('Method', 10, 10), ('SingleStateType', 10, 10), ('Flags2', 10, 10), ('DeviceStatus', 10, 10), ('SweepMode', 10, 10), ('WindowCoveringType', 10, 10), ('BatterySize', 10, 10), ('RelativeHumidityPercent', 10, 10), ('ACAlarmsMask', 10, 10), ('ZoneStatus', 10, 10), ('NwkState', 10, 10), ('ADCChannel', 10, 10), ('FanState', 10, 10), ('SingleLEDEffectType', 10, 10), ('Resolution', 10, 10), ('PowerConfiguration', 10, 10), ('CustomEndpoint', 10, 10), ('DescriptorMetaclass', 10, 10), ('NoPublicConstructor', 10, 10), ('ConnectionState', 10, 10), ('Actions', 10, 10), ('ReolinkButtonEntityDescription', 10, 10), ('ReolinkSelectEntityDescription', 10, 10), ('ReolinkNVRSwitchEntityDescription', 10, 10), ('ReolinkPushBinarySensorEntity', 10, 10), ('ReolinkSelectEntity', 10, 10), ('BLEConnectionError', 10, 10), ('ClimateFanMode', 10, 10), ('AlarmControlPanelState', 10, 10), ('TodoListEntityFeature', 10, 10), ('RpcBinarySensorDescription', 10, 10), ('EsphomeEnumMapper', 10, 10), ('XiaomiGenericSensor', 10, 10), ('MqttLightJson', 10, 10), ('ExtendedBinarySensorDeviceClass', 10, 10), ('DeviceKey', 10, 10), ('OnOffClusterHandler', 10, 10), ('MockRoute', 10, 10), ('CompoundSelect', 10, 10), ('TypeClause', 10, 10), ('Weather_Type', 10, 10), ('MediaControlFlags', 10, 10), ('NamespaceLoader', 9, 9), ('_NamespacePath', 9, 9), ('SSLErrorNumber', 9, 9), ('UnitOfPower', 9, 9), ('UnitOfTemperature', 9, 9), ('HTTPMethod', 9, 9), ('WSMsgType', 9, 9), ('NewType', 9, 9), ('generator', 9, 9), ('Unauthorized', 9, 9), ('NumberMode', 9, 9), ('hybridmethod', 9, 9), ('DateTime', 9, 9), ('BigInteger', 9, 9), ('ARRAY', 9, 9), ('SunSensorEntityDescription', 9, 9), ('SimpleQueue', 9, 9), ('IssueEntry', 9, 9), ('SupervisorIssueContext', 9, 9), ('ResourceOptions', 9, 9), ('YamlCollection', 9, 9), ('Delete', 9, 9), ('RecorderRuns', 9, 9), ('Interceptor', 9, 9), ('AudioSampleRates', 9, 9), ('UpnpActionErrorCode', 9, 9), ('HeaderField', 9, 9), ('Path', 9, 9), ('Tuple', 9, 9), ('ServiceIntentHandler', 9, 9), ('AddrMode', 9, 9), ('MACCapabilityFlags', 9, 9), ('DynamicAnchor', 9, 9), ('RotationalSpeedRPM', 9, 9), ('PumpStatus', 9, 9), ('NcpResetCode', 9, 9), ('EmberNodeType', 9, 9), ('EmberKeyStructBitmask', 9, 9), ('RegistrationStatus', 9, 9), ('BootloaderStatus', 9, 9), ('NodeRelation', 9, 9), ('DeviceStatusElectric', 9, 9), ('DeviceStatusGas', 9, 9), ('DeviceStatusWater', 9, 9), ('DeviceStatusHeatingCooling', 9, 9), ('EBLTagId', 9, 9), ('KeypadLock', 9, 9), ('AqaraPresenceEvents', 9, 9), ('snetio', 9, 9), ('SunSensor', 9, 9), ('SOCKS5ReplyCode', 9, 9), ('ParamKey', 9, 9), ('ReolinkBinarySensorEntityDescription', 9, 9), ('BlockShellyCover', 9, 9), ('ButtonInfo', 9, 9), ('BinarySensorInfo', 9, 9), ('MqttUpdate', 9, 9), ('BinarySensorState', 9, 9), ('LutStrategy', 9, 9), ('PowerProfile', 9, 9), ('PtrDecl', 9, 9), ('EnumField', 9, 9), ('NetworkInterface', 9, 9), ('XShortEnumField', 9, 9), ('IfConfig', 9, 9), ('Room', 9, 9), ('AddressInfo', 8, 8), ('UnitOfVolumetricFlux', 8, 8), ('AwesomeVersionStrategy', 8, 8), ('SHA256', 8, 8), ('FlowResultType', 8, 8), ('UpdateType', 8, 8), ('SourceType', 8, 8), ('_MetaOptions', 8, 8), ('Time', 8, 8), ('NAME', 8, 8), ('REGCLASS', 8, 8), ('ForeignKeyConstraint', 8, 8)]
2024-10-22 16:21:57.729 CRITICAL (SyncWorker_13) [homeassistant.components.profiler] Memory Growth: [('Context', 7482, 31), ('TimerHandle', 540, 14), ('State', 3841, 13), ('Event', 1957, 9), ('builtin_function_or_method', 11850, 4), ('partial', 6953, 4), ('HassJob', 5564, 4), ('WSMessage', 38, 3), ('ReadOnlyDict', 7713, 3), ('TemplateState', 677, 3), ('Handle', 56, 2), ('memoryview', 12, 2), ('RLock', 6224, 1), ('CastMessage', 1, 1), ('Condition', 117, 1), ('_TrackTimeInterval', 30, 1), ('AdvertisementData', 15, 1), ('LogEntry', 4, 1), ('ServerDisconnectedError', 1, 1)]
2024-10-22 16:22:27.652 CRITICAL (SyncWorker_35) [homeassistant.components.profiler] Memory Growth: [('dict', 314743, 24), ('deque', 7979, 5), ('list', 236014, 4), ('BLEDevice', 95, 3), ('TemplateState', 680, 3), ('ReadOnlyDict', 7715, 2), ('CIMultiDict', 185, 2), ('Future', 139, 1), ('_WorkItem', 2, 1), ('BluetoothServiceInfoBleak', 101, 1), ('URL', 115, 1), ('SplitResult', 239, 1), ('RawRequestMessage', 18, 1), ('KeyedRef', 309, 1), ('State', 3842, 1), ('socket', 61, 1), ('RequestHandler', 13, 1), ('HttpRequestParser', 9, 1), ('AccessLogger', 13, 1), ('_SelectorSocketTransport', 34, 1), ('HomeAssistantRequest', 17, 1), ('UrlMappingMatchInfo', 9, 1), ('StreamWriter', 14, 1), ('CIMultiDictProxy', 171, 1), ('TransportSocket', 46, 1), ('SimpleCookie', 31, 1), ('StreamReader', 5, 1), ('SelectorKey', 54, 1), ('ConnectionKey', 17, 1), ('_CacheHashWrapper', 17, 1), ('ResponseHandler', 17, 1), ('TimerNoop', 2, 1), ('Response', 2, 1)]
2024-10-22 16:22:57.742 CRITICAL (SyncWorker_18) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 682, 2), ('BluetoothServiceInfoBleak', 103, 2), ('WSMessage', 39, 1), ('BLEDevice', 96, 1)]
2024-10-22 16:23:27.764 CRITICAL (SyncWorker_2) [homeassistant.components.profiler] Memory Growth: [('builtin_function_or_method', 11877, 27), ('Handle', 83, 27), ('Task', 103, 25), ('tuple', 149529, 16), ('Context', 7493, 11), ('State', 3845, 3), ('TemplateState', 685, 3), ('dict', 314744, 1), ('FileIO', 8, 1), ('HTTPResponse', 6, 1), ('HTTPMessage', 6, 1), ('uint16_t', 2710, 1), ('BluetoothServiceInfoBleak', 104, 1)]
2024-10-22 16:23:57.621 CRITICAL (SyncWorker_41) [homeassistant.components.profiler] Memory Growth: [('Context', 7527, 34), ('DNSAddress', 59, 24), ('State', 3849, 4), ('BLEDevice', 98, 2), ('TemplateState', 687, 2), ('BufferedReader', 4, 1), ('DNSNsec', 33, 1), ('suppress', 2, 1), ('BluetoothServiceInfoBleak', 105, 1)]
2024-10-22 16:24:27.749 CRITICAL (SyncWorker_18) [homeassistant.components.profiler] Memory Growth: [('AdvertisementData', 18, 3), ('TemplateState', 689, 2), ('BluetoothServiceInfoBleak', 107, 2), ('BLEDevice', 99, 1)]
2024-10-22 16:24:50.205 WARNING (MainThread) [aioesphomeapi.connection] m5stack-atom-lite-d67060 @ 192.168.86.192: Connection error occurred: [Errno 104] Connection reset by peer
2024-10-22 16:24:57.666 CRITICAL (SyncWorker_21) [homeassistant.components.profiler] Memory Growth: [('AdvertisementData', 47, 29), ('BLEDevice', 109, 10), ('BluetoothServiceInfoBleak', 114, 7), ('TemplateState', 694, 5), ('function', 132210, 3), ('cell', 73163, 2), ('Future', 140, 1), ('Condition', 118, 1), ('RLock', 6225, 1), ('list_iterator', 4, 1), ('DNSAddress', 60, 1), ('LogEntry', 5, 1)]


Part 2

2024-10-22 16:25:27.737 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 7417, 412), ('deque', 8389, 410), ('ReadOnlyDict', 7738, 23), ('AutomationTrace', 162, 9), ('TemplateState', 698, 4), ('CaseInsensitiveDict', 591, 1)]
2024-10-22 16:25:57.783 CRITICAL (SyncWorker_37) [homeassistant.components.profiler] Memory Growth: [('State', 3856, 7), ('TemplateState', 702, 4), ('_lru_cache_wrapper', 4133, 1), ('cython_function_or_method', 2339, 1), ('ZeroconfIPv6Address', 24, 1), ('__pyx_scope_struct_1___init__', 80, 1)]
2024-10-22 16:26:27.780 CRITICAL (SyncWorker_15) [homeassistant.components.profiler] Memory Growth: []
2024-10-22 16:26:57.756 CRITICAL (SyncWorker_60) [homeassistant.components.profiler] Memory Growth: [('State', 3876, 20), ('Event', 1972, 15), ('TemplateState', 706, 4), ('ReadOnlyDict', 7740, 2), ('BluetoothServiceInfoBleak', 116, 2), ('BLEDevice', 110, 1)]
2024-10-22 16:27:27.761 CRITICAL (SyncWorker_50) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 711, 5)]
2024-10-22 16:27:57.788 CRITICAL (SyncWorker_63) [homeassistant.components.profiler] Memory Growth: [('State', 3884, 8), ('TemplateState', 714, 3)]
2024-10-22 16:28:27.783 CRITICAL (SyncWorker_51) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 717, 3), ('tuple_iterator', 1, 1)]
2024-10-22 16:28:57.751 CRITICAL (SyncWorker_34) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 723, 6), ('deque', 8391, 2), ('ConnectionKey', 18, 1), ('_CacheHashWrapper', 18, 1), ('ResponseHandler', 18, 1), ('HttpResponseParser', 17, 1), ('TimerContext', 16, 1)]
2024-10-22 16:29:27.830 CRITICAL (SyncWorker_30) [homeassistant.components.profiler] Memory Growth: [('coroutine', 268, 3), ('function', 132212, 2), ('CIMultiDict', 187, 2), ('TemplateState', 725, 2), ('Timeout', 12, 1), ('cell', 73164, 1), ('URL', 116, 1), ('SplitResult', 240, 1), ('SimpleCookie', 32, 1), ('HassClientResponse', 16, 1), ('RequestInfo', 16, 1), ('TimeoutHandle', 15, 1), ('coroutine_wrapper', 1, 1), ('JsonPayload', 1, 1), ('ClientRequest', 1, 1)]
2024-10-22 16:29:57.705 CRITICAL (SyncWorker_17) [homeassistant.components.profiler] Memory Growth: [('deque', 8404, 13), ('State', 3892, 8), ('TemplateState', 731, 6), ('KeyedRef', 312, 3), ('socket', 64, 3), ('_SelectorSocketTransport', 37, 3), ('TransportSocket', 49, 3), ('Lock', 976, 2), ('ReadOnlyDict', 7742, 2), ('StreamReader', 7, 2), ('MemoryBIO', 14, 2), ('SelectorKey', 56, 2), ('ConnectionKey', 20, 2), ('_CacheHashWrapper', 20, 2), ('ResponseHandler', 20, 2), ('HttpResponseParser', 19, 2), ('TimerContext', 18, 2), ('ResourceGuard', 4, 2), ('AsyncLock', 4, 2), ('ClientConnectionError', 2, 2), ('_UnionGenericAlias', 1693, 1), ('_SSLSocket', 13, 1), ('Headers', 5, 1), ('SSLObject', 7, 1), ('ConnectionState', 11, 1), ('SocketStream', 2, 1), ('AsyncHTTPConnection', 2, 1), ('AnyIOStream', 2, 1), ('TLSStream', 2, 1), ('AsyncHTTP11Connection', 2, 1), ('StreamProtocol', 2, 1), ('Origin', 2, 1), ('ReceiveBuffer', 2, 1)]
2024-10-22 16:30:27.760 CRITICAL (SyncWorker_62) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 7829, 412), ('deque', 8800, 396), ('ReadOnlyDict', 7771, 29), ('AutomationTrace', 171, 9), ('immutabledict', 411, 3), ('AnnotatedUpdate', 6, 3), ('BindParameter', 407, 2), ('Update', 13, 2), ('CacheKey', 47, 2), ('TemplateState', 733, 2), ('frozenset', 6811, 1), ('attrgetter', 890, 1), ('PopulateDict', 55, 1), ('portable_instancemethod', 98, 1), ('_DialectArgDict', 36, 1), ('BinaryExpression', 285, 1), ('BooleanClauseList', 74, 1), ('MySQLCompiler_mysqldb', 45, 1), ('prefix_anon_map', 67, 1), ('FromLinter', 29, 1), ('CancelledError', 3, 1), ('BulkORMUpdate', 2, 1), ('_DialectArgView', 2, 1)]
2024-10-22 16:30:57.763 CRITICAL (SyncWorker_52) [homeassistant.components.profiler] Memory Growth: [('uint8_t', 3536, 9), ('deque', 8806, 6), ('State', 3898, 6), ('NWK', 140, 4), ('AddrModeAddress', 58, 4), ('Event', 1974, 2), ('ClusterId', 717, 2), ('ZigbeePacket', 29, 2), ('SerializableBytes', 29, 2), ('TemplateState', 735, 2), ('PlatformEntityIdentifiers', 38, 1)]
2024-10-22 16:31:27.792 CRITICAL (SyncWorker_52) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 739, 4), ('Gauge', 4508, 1), ('MutexValue', 6097, 1)]
2024-10-22 16:31:57.837 CRITICAL (SyncWorker_34) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 743, 4), ('ReadOnlyDict', 7774, 3), ('State', 3900, 2)]
2024-10-22 16:32:27.776 CRITICAL (SyncWorker_48) [homeassistant.components.profiler] Memory Growth: [('State', 3904, 4), ('TemplateState', 744, 1)]
2024-10-22 16:32:57.764 CRITICAL (SyncWorker_24) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 747, 3)]
2024-10-22 16:33:27.759 CRITICAL (SyncWorker_10) [homeassistant.components.profiler] Memory Growth: [('State', 3907, 3), ('TemplateState', 750, 3)]
2024-10-22 16:33:57.661 CRITICAL (SyncWorker_48) [homeassistant.components.profiler] Memory Growth: [('State', 3910, 3), ('TemplateState', 752, 2)]
2024-10-22 16:34:27.796 CRITICAL (SyncWorker_47) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 756, 4), ('_WorkItem', 3, 1)]
2024-10-22 16:34:57.663 CRITICAL (SyncWorker_35) [homeassistant.components.profiler] Memory Growth: [('State', 3927, 17), ('Event', 1979, 5), ('TemplateState', 759, 3)]
2024-10-22 16:35:27.756 CRITICAL (SyncWorker_25) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 8241, 412), ('deque', 9212, 406), ('ReadOnlyDict', 7799, 25), ('Context', 7548, 21), ('AutomationTrace', 180, 9), ('TemplateState', 764, 5), ('VirtualMemory', 2, 1)]
2024-10-22 16:35:57.623 CRITICAL (SyncWorker_8) [homeassistant.components.profiler] Memory Growth: [('deque', 9218, 6), ('TemplateState', 768, 4)]
2024-10-22 16:36:27.760 CRITICAL (SyncWorker_11) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 771, 3)]
2024-10-22 16:36:57.763 CRITICAL (SyncWorker_45) [homeassistant.components.profiler] Memory Growth: [('Context', 7610, 62), ('State', 3939, 12), ('Event', 1986, 7), ('ReadOnlyDict', 7802, 3), ('WSMessage', 41, 2), ('TemplateState', 773, 2)]
2024-10-22 16:37:27.773 CRITICAL (SyncWorker_45) [homeassistant.components.profiler] Memory Growth: [('tuple', 149543, 14), ('partial', 6961, 8), ('cell', 73167, 3), ('TemplateState', 776, 3), ('IPv4Address', 57, 1), ('IPv6Address', 68, 1), ('RawRequestMessage', 19, 1), ('Lock', 977, 1), ('HomeAssistantRequest', 18, 1), ('FlowControlDataQueue', 22, 1), ('ActiveConnection', 7, 1), ('WebSocketHandler', 7, 1), ('WebSocketAdapter', 7, 1), ('AuthPhase', 7, 1), ('WebSocketResponse', 8, 1), ('WebSocketWriter', 22, 1), ('ZLibCompressor', 7, 1), ('Connection', 24, 1)]
2024-10-22 16:37:57.777 CRITICAL (SyncWorker_9) [homeassistant.components.profiler] Memory Growth: [('tuple', 149554, 11), ('cell', 73177, 10), ('function', 132215, 3), ('TemplateState', 779, 3), ('Future', 142, 2), ('RLock', 6227, 2), ('deque', 9220, 2), ('Condition', 119, 1), ('_WorkItem', 4, 1)]
2024-10-22 16:38:27.667 CRITICAL (SyncWorker_57) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 783, 4)]
2024-10-22 16:38:57.775 CRITICAL (SyncWorker_31) [homeassistant.components.profiler] Memory Growth: [('State', 3951, 12), ('deque', 9224, 4), ('TemplateState', 785, 2), ('Event', 1987, 1), ('RequestHandler', 14, 1), ('AccessLogger', 14, 1)]
2024-10-22 16:39:27.687 CRITICAL (SyncWorker_41) [homeassistant.components.profiler] Memory Growth: [('tuple', 149806, 252), ('set', 18911, 58), ('SaveUpdateState', 32, 32), ('method', 14812, 20), ('ReferenceType', 32173, 18), ('States', 33, 12), ('InstanceState', 41, 10), ('generator', 14, 5), ('TemplateState', 790, 5), ('defaultdict', 1434, 4), ('Preprocess', 4, 4), ('PopulateDict', 57, 2), ('History', 3, 2), ('ProcessAll', 2, 2), ('immutabledict', 412, 1), ('portable_instancemethod', 99, 1), ('Insert', 25, 1), ('CacheKey', 48, 1), ('UOWTransaction', 1, 1), ('SessionTransaction', 2, 1), ('dict_itemiterator', 1, 1), ('groupby', 1, 1), ('MySQLExecutionContext_mysqldb', 1, 1), ('Cursor', 1, 1), ('_InsertManyValuesBatch', 1, 1), ('SaveUpdateAll', 1, 1), ('DeleteAll', 1, 1), ('ProcessState', 1, 1)]
2024-10-22 16:39:57.702 CRITICAL (SyncWorker_46) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 794, 4), ('ReadOnlyDict', 7803, 1)]
2024-10-22 16:40:27.794 CRITICAL (SyncWorker_53) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 8653, 412), ('deque', 9631, 407), ('ReadOnlyDict', 7830, 27), ('AutomationTrace', 189, 9), ('TemplateState', 798, 4)]
2024-10-22 16:40:57.683 CRITICAL (SyncWorker_32) [homeassistant.components.profiler] Memory Growth: [('State', 3964, 13), ('Event', 1994, 7), ('deque', 9637, 6), ('TemplateState', 801, 3), ('MemoryBIO', 16, 2), ('managedbuffer', 7, 1), ('_SSLSocket', 14, 1), ('_SSLProtocolTransport', 6, 1), ('SSLProtocol', 6, 1), ('SSLObject', 8, 1)]
2024-10-22 16:41:27.802 CRITICAL (SyncWorker_29) [homeassistant.components.profiler] Memory Growth: [('ReadOnlyDict', 7831, 1)]
2024-10-22 16:41:57.783 CRITICAL (SyncWorker_32) [homeassistant.components.profiler] Memory Growth: [('State', 3975, 11), ('Event', 2001, 7), ('TemplateState', 805, 4), ('Context', 7613, 3), ('ReadOnlyDict', 7834, 3)]
2024-10-22 16:42:27.789 CRITICAL (SyncWorker_41) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 807, 2)]
2024-10-22 16:42:57.674 CRITICAL (SyncWorker_17) [homeassistant.components.profiler] Memory Growth: [('State', 3980, 5), ('TemplateState', 810, 3)]
2024-10-22 16:43:27.779 CRITICAL (SyncWorker_62) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 815, 5)]
2024-10-22 16:43:57.792 CRITICAL (SyncWorker_43) [homeassistant.components.profiler] Memory Growth: [('uint8_t', 3544, 8), ('State', 3984, 4), ('AddrModeAddress', 62, 4), ('NWK', 143, 3), ('ClusterId', 719, 2), ('ZigbeePacket', 31, 2), ('SerializableBytes', 31, 2), ('TemplateState', 817, 2), ('deque', 9638, 1), ('PlatformEntityIdentifiers', 39, 1)]
2024-10-22 16:44:27.777 CRITICAL (SyncWorker_57) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 821, 4)]
2024-10-22 16:44:57.687 CRITICAL (SyncWorker_58) [homeassistant.components.profiler] Memory Growth: [('Context', 7622, 9), ('State', 3989, 5), ('TemplateState', 825, 4)]
2024-10-22 16:45:27.791 CRITICAL (SyncWorker_12) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 9065, 412), ('deque', 10044, 406), ('ReadOnlyDict', 7859, 25), ('AutomationTrace', 198, 9), ('TemplateState', 831, 6), ('BLEDevice', 112, 2), ('BluetoothServiceInfoBleak', 117, 1)]
2024-10-22 16:45:57.766 CRITICAL (SyncWorker_13) [homeassistant.components.profiler] Memory Growth: [('State', 3997, 8), ('TemplateState', 835, 4)]
2024-10-22 16:46:27.779 CRITICAL (SyncWorker_6) [homeassistant.components.profiler] Memory Growth: [('BluetoothServiceInfoBleak', 123, 6), ('BLEDevice', 116, 4), ('TemplateState', 838, 3)]
2024-10-22 16:46:57.803 CRITICAL (SyncWorker_53) [homeassistant.components.profiler] Memory Growth: [('State', 4004, 7), ('deque', 10050, 6), ('partial', 6965, 4), ('Event', 2004, 3), ('ReadOnlyDict', 7861, 2), ('TemplateState', 840, 2), ('HassJob', 5565, 1)]
2024-10-22 16:47:27.787 CRITICAL (SyncWorker_0) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 844, 4), ('State', 4007, 3), ('uint8_t', 3545, 1)]
2024-10-22 16:47:57.698 CRITICAL (SyncWorker_41) [homeassistant.components.profiler] Memory Growth: [('Context', 7634, 12), ('State', 4016, 9), ('Event', 2010, 6), ('TemplateState', 846, 2)]
2024-10-22 16:48:27.792 CRITICAL (SyncWorker_49) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 850, 4)]
2024-10-22 16:48:57.713 CRITICAL (SyncWorker_58) [homeassistant.components.profiler] Memory Growth: [('Context', 7649, 15), ('State', 4023, 7), ('TemplateState', 852, 2), ('Event', 2011, 1), ('ReadOnlyDict', 7862, 1)]
2024-10-22 16:49:27.807 CRITICAL (SyncWorker_4) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 855, 3)]
2024-10-22 16:49:57.800 CRITICAL (SyncWorker_59) [homeassistant.components.profiler] Memory Growth: [('deque', 10054, 4), ('State', 4027, 4), ('TemplateState', 858, 3)]
2024-10-22 16:50:27.785 CRITICAL (SyncWorker_2) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 9477, 412), ('deque', 10457, 403), ('ReadOnlyDict', 7889, 27), ('AutomationTrace', 207, 9), ('Event', 2017, 6), ('State', 4030, 3), ('TemplateState', 861, 3)]
2024-10-22 16:50:57.782 CRITICAL (SyncWorker_13) [homeassistant.components.profiler] Memory Growth: [('Context', 7682, 33), ('deque', 10463, 6), ('ReadOnlyDict', 7892, 3), ('Task', 105, 2), ('MemoryBIO', 18, 2), ('builtin_function_or_method', 11878, 1), ('Handle', 84, 1), ('managedbuffer', 8, 1), ('_SSLSocket', 15, 1), ('_SSLProtocolTransport', 7, 1), ('SSLProtocol', 7, 1), ('SSLObject', 9, 1), ('TemplateState', 862, 1)]
2024-10-22 16:51:27.818 CRITICAL (SyncWorker_29) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 867, 5)]
2024-10-22 16:51:57.705 CRITICAL (SyncWorker_42) [homeassistant.components.profiler] Memory Growth: [('State', 4038, 8), ('TemplateState', 872, 5), ('DNSNsec', 35, 2)]
2024-10-22 16:52:27.811 CRITICAL (SyncWorker_38) [homeassistant.components.profiler] Memory Growth: [('DNSAddress', 67, 7), ('State', 4043, 5), ('Event', 2018, 1), ('TemplateState', 873, 1)]
2024-10-22 16:52:57.696 CRITICAL (SyncWorker_36) [homeassistant.components.profiler] Memory Growth: [('ReferenceType', 32189, 16), ('Context', 7692, 10), ('TimerHandle', 550, 10), ('DNSAddress', 71, 4), ('TemplateState', 875, 2), ('set_iterator', 1, 1)]
2024-10-22 16:53:27.843 CRITICAL (SyncWorker_46) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 879, 4), ('DNSAddress', 72, 1)]
2024-10-22 16:53:57.684 CRITICAL (SyncWorker_21) [homeassistant.components.profiler] Memory Growth: [('State', 4048, 5), ('ReadOnlyDict', 7893, 1), ('TemplateState', 880, 1)]
2024-10-22 16:54:27.805 CRITICAL (SyncWorker_56) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 883, 3), ('MimeType', 12, 1), ('MultiDictProxy', 12, 1), ('MultiDict', 14, 1)]
2024-10-22 16:54:57.702 CRITICAL (SyncWorker_20) [homeassistant.components.profiler] Memory Growth: [('Context', 7717, 25), ('State', 4059, 11), ('Event', 2022, 4), ('TemplateState', 885, 2), ('builtin_function_or_method', 11879, 1)]
2024-10-22 16:55:27.836 CRITICAL (SyncWorker_43) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 9889, 412), ('deque', 10867, 404), ('ReadOnlyDict', 7918, 25), ('AutomationTrace', 216, 9), ('TemplateState', 889, 4)]
2024-10-22 16:55:57.702 CRITICAL (SyncWorker_63) [homeassistant.components.profiler] Memory Growth: [('deque', 10873, 6), ('TemplateState', 893, 4), ('Event', 2024, 2), ('frozenset', 6812, 1), ('State', 4060, 1)]
2024-10-22 16:56:27.815 CRITICAL (SyncWorker_10) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 896, 3)]
2024-10-22 16:56:57.847 CRITICAL (SyncWorker_15) [homeassistant.components.profiler] Memory Growth: [('State', 4072, 12), ('Event', 2033, 9), ('deque', 10876, 3)]
2024-10-22 16:57:27.815 CRITICAL (SyncWorker_50) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 900, 4), ('ReadOnlyDict', 7919, 1)]
2024-10-22 16:57:57.724 CRITICAL (SyncWorker_49) [homeassistant.components.profiler] Memory Growth: [('State', 4078, 6), ('TemplateState', 903, 3)]
2024-10-22 16:58:27.805 CRITICAL (SyncWorker_13) [homeassistant.components.profiler] Memory Growth: [('State', 4080, 2), ('TemplateState', 905, 2)]
2024-10-22 16:58:57.726 CRITICAL (SyncWorker_14) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 909, 4)]
2024-10-22 16:59:27.853 CRITICAL (SyncWorker_39) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 912, 3), ('Task', 106, 1), ('TaskStepMethWrapper', 1, 1)]
2024-10-22 16:59:57.839 CRITICAL (SyncWorker_49) [homeassistant.components.profiler] Memory Growth: [('deque', 10883, 7), ('TemplateState', 918, 6), ('ReadOnlyDict', 7924, 5), ('State', 4083, 3), ('Context', 7718, 1), ('socket', 65, 1), ('_SelectorSocketTransport', 38, 1), ('CIMultiDict', 188, 1), ('TransportSocket', 50, 1)]
2024-10-22 17:00:27.817 CRITICAL (SyncWorker_17) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 10301, 412), ('deque', 11279, 396), ('HassJob', 5611, 46), ('Context', 7757, 39), ('cell', 73210, 33), ('ReadOnlyDict', 7948, 24), ('_TrackPointUTCTime', 248, 22), ('TimerHandle', 568, 18), ('method', 14829, 17), ('function', 132231, 16), ('AutomationTrace', 225, 9), ('State', 4088, 5), ('TemplateState', 923, 5)]
2024-10-22 17:00:57.710 CRITICAL (SyncWorker_41) [homeassistant.components.profiler] Memory Growth: [('deque', 11288, 9), ('method', 14832, 3), ('TemplateState', 926, 3), ('ReadOnlyDict', 7950, 2), ('partial', 6966, 1)]
2024-10-22 17:01:27.827 CRITICAL (SyncWorker_20) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 929, 3)]
2024-10-22 17:01:57.688 CRITICAL (SyncWorker_12) [homeassistant.components.profiler] Memory Growth: [('method', 14836, 4), ('ReadOnlyDict', 7953, 3), ('TemplateState', 931, 2)]
2024-10-22 17:02:27.808 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] Memory Growth: [('State', 4093, 5), ('TemplateState', 935, 4)]
2024-10-22 17:02:57.719 CRITICAL (SyncWorker_41) [homeassistant.components.profiler] Memory Growth: [('State', 4096, 3), ('TemplateState', 938, 3), ('deque', 11289, 1)]
2024-10-22 17:03:27.846 CRITICAL (SyncWorker_57) [homeassistant.components.profiler] Memory Growth: [('State', 4104, 8), ('TemplateState', 943, 5)]
2024-10-22 17:03:57.838 CRITICAL (SyncWorker_6) [homeassistant.components.profiler] Memory Growth: [('Context', 7779, 22), ('State', 4117, 13), ('Event', 2039, 6), ('cell', 73214, 4), ('function', 132235, 4), ('coroutine', 271, 3), ('CIMultiDict', 190, 2), ('TemplateState', 945, 2), ('URL', 117, 1), ('SplitResult', 241, 1), ('CIMultiDictProxy', 172, 1), ('SimpleCookie', 33, 1)]
2024-10-22 17:04:27.875 CRITICAL (SyncWorker_44) [homeassistant.components.profiler] Memory Growth: [('method', 14854, 18), ('TemplateState', 949, 4)]
2024-10-22 17:04:57.807 CRITICAL (SyncWorker_25) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 952, 3)]
2024-10-22 17:05:27.851 CRITICAL (SyncWorker_43) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 10713, 412), ('deque', 11692, 403), ('ReadOnlyDict', 7977, 24), ('AutomationTrace', 234, 9), ('State', 4120, 3), ('TemplateState', 955, 3), ('Event', 2041, 2), ('NWK', 144, 1)]
2024-10-22 17:05:57.834 CRITICAL (SyncWorker_11) [homeassistant.components.profiler] Memory Growth: [('deque', 11697, 5), ('ReadOnlyDict', 7981, 4), ('TemplateState', 957, 2)]
2024-10-22 17:06:27.827 CRITICAL (SyncWorker_56) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 960, 3)]
2024-10-22 17:06:57.719 CRITICAL (SyncWorker_12) [homeassistant.components.profiler] Memory Growth: [('State', 4129, 9), ('Event', 2043, 2), ('TemplateState', 962, 2)]
2024-10-22 17:07:27.861 CRITICAL (SyncWorker_48) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 966, 4)]
2024-10-22 17:07:57.729 CRITICAL (SyncWorker_10) [homeassistant.components.profiler] Memory Growth: [('State', 4131, 2), ('TemplateState', 968, 2)]
2024-10-22 17:08:27.872 CRITICAL (SyncWorker_18) [homeassistant.components.profiler] Memory Growth: [('State', 4139, 8), ('Context', 7784, 5), ('TemplateState', 971, 3), ('ReadOnlyDict', 7983, 2), ('Event', 2044, 1)]
2024-10-22 17:08:57.735 CRITICAL (SyncWorker_52) [homeassistant.components.profiler] Memory Growth: [('Context', 7792, 8), ('TemplateState', 975, 4), ('State', 4140, 1)]
2024-10-22 17:09:27.839 CRITICAL (SyncWorker_9) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 978, 3), ('ServerDisconnectedError', 2, 1)]
2024-10-22 17:09:57.729 CRITICAL (SyncWorker_22) [homeassistant.components.profiler] Memory Growth: [('cell', 73226, 12), ('function', 132239, 4), ('immutabledict', 415, 3), ('TemplateState', 981, 3), ('AnnotatedUpdate', 9, 3), ('frozenset', 6813, 1), ('BinaryExpression', 286, 1), ('BindParameter', 408, 1), ('ReadOnlyDict', 7984, 1), ('Update', 14, 1), ('BooleanClauseList', 75, 1), ('CacheKey', 49, 1), ('default_update_options', 1, 1)]
2024-10-22 17:10:27.709 CRITICAL (SyncWorker_9) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 11125, 412), ('deque', 12103, 406), ('ReadOnlyDict', 8008, 24), ('AutomationTrace', 243, 9), ('State', 4148, 8), ('Event', 2050, 6), ('Context', 7796, 4), ('TemplateState', 984, 3), ('DNSNsec', 36, 1)]
2024-10-22 17:10:57.738 CRITICAL (SyncWorker_16) [homeassistant.components.profiler] Memory Growth: [('Context', 7812, 16), ('deque', 12108, 5), ('ReadOnlyDict', 8013, 5), ('State', 4152, 4), ('TemplateState', 986, 2), ('Event', 2051, 1), ('ZoneStatus', 11, 1), ('ReceiveMessage', 105, 1), ('PlatformEntityIdentifiers', 40, 1), ('bitmap8', 1, 1)]
2024-10-22 17:11:27.857 CRITICAL (SyncWorker_28) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 991, 5), ('UrlMappingMatchInfo', 11, 2), ('StreamWriter', 16, 2), ('RawRequestMessage', 20, 1), ('RequestHandler', 15, 1), ('HttpRequestParser', 10, 1), ('AccessLogger', 15, 1), ('HomeAssistantRequest', 19, 1), ('CIMultiDictProxy', 173, 1), ('MultiDictProxy', 13, 1), ('MultiDict', 15, 1), ('TimerNoop', 3, 1), ('PushChannel', 3, 1), ('Response', 3, 1)]
2024-10-22 17:11:57.858 CRITICAL (SyncWorker_23) [homeassistant.components.profiler] Memory Growth: [('State', 4164, 12), ('traceback', 176, 11), ('frame', 127, 8), ('Event', 2056, 5), ('ReceiveMessage', 107, 2), ('CancelledError', 4, 1), ('TemplateState', 992, 1), ('ClientConnectionResetError', 1, 1)]
2024-10-22 17:12:27.832 CRITICAL (SyncWorker_10) [homeassistant.components.profiler] Memory Growth: [('ReceiveMessage', 109, 2), ('TemplateState', 993, 1)]
2024-10-22 17:12:57.824 CRITICAL (SyncWorker_30) [homeassistant.components.profiler] Memory Growth: [('Context', 7844, 32), ('State', 4171, 7), ('Event', 2059, 3), ('TemplateState', 995, 2)]
2024-10-22 17:13:27.874 CRITICAL (SyncWorker_19) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1000, 5), ('ReceiveMessage', 110, 1)]
2024-10-22 17:13:57.712 CRITICAL (SyncWorker_3) [homeassistant.components.profiler] Memory Growth: [('uint8_t', 3549, 4), ('uint1_t', 143, 3), ('TemplateState', 1003, 3), ('uint3_t', 96, 2), ('ZCLHeader', 2, 2), ('FrameControl', 2, 2), ('Timeout', 13, 1), ('uint16_t', 2711, 1), ('NWK', 145, 1), ('PanId', 5, 1), ('Callback', 8, 1), ('AddrModeAddress', 63, 1), ('OneShotResponseListener', 1, 1), ('QueryNextImageCommand', 1, 1), ('query_next_image_response', 1, 1), ('Req', 1, 1), ('LongBytes', 1, 1)]
2024-10-22 17:14:27.840 CRITICAL (SyncWorker_24) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1007, 4), ('ReceiveMessage', 111, 1)]
2024-10-22 17:14:57.856 CRITICAL (SyncWorker_31) [homeassistant.components.profiler] Memory Growth: [('State', 4180, 9), ('TemplateState', 1009, 2), ('ReadOnlyDict', 8014, 1)]
2024-10-22 17:15:27.839 CRITICAL (SyncWorker_16) [homeassistant.components.profiler] Memory Growth: [('TraceElement', 11537, 412), ('deque', 12513, 405), ('ReadOnlyDict', 8037, 23), ('AutomationTrace', 252, 9), ('TemplateState', 1013, 4)]
2024-10-22 17:15:57.759 CRITICAL (SyncWorker_0) [homeassistant.components.profiler] Memory Growth: [('ReadOnlyDict', 8041, 4), ('TemplateState', 1015, 2)]
2024-10-22 17:16:27.863 CRITICAL (SyncWorker_33) [homeassistant.components.profiler] Memory Growth: [('State', 4183, 3), ('TemplateState', 1017, 2)]
2024-10-22 17:16:57.899 CRITICAL (SyncWorker_37) [homeassistant.components.profiler] Memory Growth: [('States', 84, 51), ('InstanceState', 92, 51), ('State', 4209, 26), ('Event', 2081, 22), ('method', 14869, 15), ('TemplateState', 1020, 3), ('ReceiveMessage', 112, 1)]
2024-10-22 17:17:27.831 CRITICAL (SyncWorker_8) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1023, 3)]
2024-10-22 17:17:57.723 CRITICAL (SyncWorker_50) [homeassistant.components.profiler] Memory Growth: [('deque', 12520, 7), ('ReadOnlyDict', 8047, 6), ('partial', 6969, 3), ('TemplateState', 1025, 2)]
2024-10-22 17:18:27.860 CRITICAL (SyncWorker_58) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1028, 3), ('deque', 12521, 1)]
2024-10-22 17:18:57.727 CRITICAL (SyncWorker_4) [homeassistant.components.profiler] Memory Growth: [('Context', 7845, 1), ('Struct', 1039, 1), ('ReceiveMessage', 113, 1), ('TemplateState', 1029, 1)]
2024-10-22 17:19:27.874 CRITICAL (SyncWorker_26) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1033, 4), ('deque', 12522, 1)]
2024-10-22 17:19:57.752 CRITICAL (SyncWorker_26) [homeassistant.components.profiler] Memory Growth: [('Context', 7876, 31), ('builtin_function_or_method', 11885, 6), ('TemplateState', 1037, 4), ('Handle', 85, 1)]
2024-10-22 17:20:27.870 CRITICAL (SyncWorker_53) [homeassistant.components.profiler] Memory Growth: [('deque', 12934, 412), ('TraceElement', 11949, 412), ('ReadOnlyDict', 8080, 33), ('AutomationTrace', 261, 9), ('TemplateState', 1040, 3), ('_GenericAlias', 2251, 1), ('_UnionGenericAlias', 1694, 1), ('HassJob', 5612, 1)]
2024-10-22 17:20:57.749 CRITICAL (SyncWorker_27) [homeassistant.components.profiler] Memory Growth: [('Struct', 1041, 2), ('TemplateState', 1042, 2)]
2024-10-22 17:21:27.857 CRITICAL (SyncWorker_4) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1047, 5)]
2024-10-22 17:21:57.774 CRITICAL (SyncWorker_26) [homeassistant.components.profiler] Memory Growth: [('State', 4217, 8), ('Struct', 1043, 2), ('TemplateState', 1048, 1)]
2024-10-22 17:22:27.860 CRITICAL (SyncWorker_20) [homeassistant.components.profiler] Memory Growth: [('State', 4219, 2), ('TemplateState', 1050, 2)]
2024-10-22 17:22:57.784 CRITICAL (SyncWorker_5) [homeassistant.components.profiler] Memory Growth: [('TemplateState', 1053, 3)]

Object growth is usually only a problem if it keeps growing significantly after 30 minutes

I’ll try to execute this during a memory leak event, because so far nothing it is standing out.

@bdraco, currently experiencing a memory leak.
image

Aside from the tracking down a memory leak of python objects, what can I do more to help troubleshooting this?

I did disable some templates, and it seemed to be more stable. But I ended up, reactivating them, having to restart HA due to upgrade, and another integration.
Update: It might be the renders after all. I’m with uptime of 18 hours, and these are the following renders (over 6k).

2024-10-25 19:02:56.141 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({% set barTH = [960, 965, 970] %}
{% set windTH = 40 %}
{% set rainrateRainy = states('input_number.rain_rate_rainy') %}
{% set rainratePouring = states('input_number.rain_rate_pouring') %}
{% set bar = states('sensor.home_weather_station_relative_pressure') | float %}
{% set rainrate = states('sensor.home_weather_station_rain_rate') | float %}
{% set temp = states('sensor.home_weather_station_outdoor_temperature') | float %}
{% set wind = states('sensor.home_weather_station_wind_speed') | float %}
{% set wsStatus = states('input_boolean.weather_stations_is_installed') %}

{% if bar < 0 or rainrate < 0 or temp < -40 or wsStatus == 'off' %}
  {{ states('weather.ipma_weather_daily') }}
{% else %}
  {% set state = "clear" %}

  {% if rainrate == 0 %}
    {% if bar < barTH[0] %}
      {% set state = "cloudy" %}
    {% elif bar < barTH[1] %}
      {% set state = "partly-cloudy" %}
    {% elif bar < barTH[2] %}
      {% set state = "few" %}
    {% elif wind > windTH %}
      {% set state = "windy" %}
    {% else %}
      {% set state = "clear" %}
    {% endif %}
   
  {% else %}
    {% if temp < 0 %}
      {% set state = "snowy" %}
    {% else %}
      {% if rainrate < rainrateRainy %}
        {% set state = "light-rain" %}
      {% elif rainrate < rainratePouring %}
        {% set state = "rainy" %}
      {% elif rainrate > rainratePouring and wind > windTH %}
        {% set state = "stormy" %}
      {% else %}
        {% set state = "pouring" %}
      {% endif %}
    {% endif %}
  {% endif %}
  {{ state }}
{% endif %}) renders=6162> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.home_weather_station_wind_speed', 'input_number.rain_rate_pouring', 'input_boolean.weather_stations_is_installed', 'sensor.home_weather_station_outdoor_temperature', 'sensor.home_weather_station_rain_rate', 'sensor.home_weather_station_relative_pressure', 'input_number.rain_rate_rainy'}) rate_limit=None has_time=False exception=None is_static=False>
2024-10-25 19:02:56.141 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({% set barTH = [960, 965, 970] %}
{% set windTH = 40 %}
{% set rainrateRainy = states('input_number.rain_rate_rainy') %}
{% set rainratePouring = states('input_number.rain_rate_pouring') %}
{% set bar = states('sensor.home_weather_station_relative_pressure') | float %}
{% set rainrate = states('sensor.home_weather_station_rain_rate') | float %}
{% set temp = states('sensor.home_weather_station_outdoor_temperature') | float %}
{% set wind = states('sensor.home_weather_station_wind_speed') | float %}
{% set wsStatus = states('input_boolean.weather_stations_is_installed') %}

{% if bar < 0 or rainrate < 0 or temp < -40 or wsStatus == 'off' %}
  {{ states('weather.ipma_weather_daily') }}
{% else %}
  {% set state = "Clear" %}

  {% if rainrate == 0 %}
    {% if bar < barTH[0] %}
      {% set state = "Cloudy" %}
    {% elif bar < barTH[1] %}
      {% set state = "Partly Cloudy" %}
    {% elif bar < barTH[2] %}
      {% set state = "Mostly Sunny" %}
    {% elif wind > windTH %}
      {% set state = "Windy" %}
    {% else %}
      {% set state = "Clear" %}
    {% endif %}
   
  {% else %}
    {% if temp < 0 %}
      {% set state = "Snowy" %}
    {% else %}
      {% if rainrate < rainrateRainy %}
        {% set state = "Light Rain" %}
      {% elif rainrate < rainratePouring %}
        {% set state = "Rainy" %}
      {% elif rainrate > rainratePouring and wind > windTH %}
        {% set state = "Stormy" %}
      {% else %}
        {% set state = "Pouring" %}
      {% endif %}
    {% endif %}
  {% endif %}
  {{ state }}
{% endif %}) renders=6162> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.home_weather_station_wind_speed', 'input_number.rain_rate_pouring', 'input_boolean.weather_stations_is_installed', 'sensor.home_weather_station_outdoor_temperature', 'sensor.home_weather_station_rain_rate', 'sensor.home_weather_station_relative_pressure', 'input_number.rain_rate_rainy'}) rate_limit=None has_time=False exception=None is_static=False>
2024-10-25 19:02:56.141 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({% set barTH = [960, 965, 970] %}
{% set windTH = 40 %}
{% set rainrateRainy = states('input_number.rain_rate_rainy') %}
{% set rainratePouring = states('input_number.rain_rate_pouring') %}
{% set bar = states('sensor.home_weather_station_relative_pressure') | float %}
{% set rainrate = states('sensor.home_weather_station_rain_rate') | float %}
{% set temp = states('sensor.home_weather_station_outdoor_temperature') | float %}
{% set wind = states('sensor.home_weather_station_wind_speed') | float %}
{% set wsStatus = states('input_boolean.weather_stations_is_installed') %}

{% if bar < 0 or rainrate < 0 or temp < -40 or wsStatus == 'off' %}
  {{ states('weather.ipma_weather_daily') }}
{% else %}
  {% set state = "☀️" %}

  {% if rainrate == 0 %}
    {% if bar < barTH[0] %}
      {% set state = "☁️" %}
    {% elif bar < barTH[1] %}
      {% set state = "🌥️" %}
    {% elif bar < barTH[2] %}
      {% set state = "⛅" %}
    {% elif wind > windTH %}
      {% set state = "🌬️" %}
    {% elif is_state('sun.sun', 'below_horizon') %}
      {% set state = "🌙" %}
    {% else %}
      {% set state = "☀️" %}
    {% endif %}
   
  {% else %}
    {% if temp < 0 %}
      {% set state = "🌨️" %}
    {% else %}
      {% if rainrate < rainrateRainy %}
        {% set state = "🌦️" %}
      {% elif rainrate < rainratePouring %}
        {% set state = "🌧️" %}
      {% elif rainrate > rainratePouring and wind > windTH %}
        {% set state = "⛈️" %}
      {% else %}
        {% set state = "⛈️" %}
      {% endif %}
    {% endif %}
  {% endif %}
  {{ state }}
{% endif %}) renders=6618> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.home_weather_station_wind_speed', 'input_number.rain_rate_pouring', 'input_boolean.weather_stations_is_installed', 'sun.sun', 'sensor.home_weather_station_outdoor_temperature', 'input_number.rain_rate_rainy', 'sensor.home_weather_station_relative_pressure', 'sensor.home_weather_station_rain_rate'}) rate_limit=None has_time=False exception=None is_static=False>
2024-10-25 19:02:56.141 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({% if states('input_boolean.weather_stations_is_installed') == 'off' %}
  {{ states('weather.ipma_weather_daily') }}
{% elif states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_pouring') | float %}
  pouring
{% elif states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_rainy') | float %}
  rainy
{% elif states('sensor.home_weather_station_rain_rate') | float > 0 %}
  light-rain
{% elif states('sensor.home_weather_station_uv_index') | float > 3 and states('sensor.home_weather_station_solar_radiation') | float > 200 %}
  sunny
{% elif states('sensor.home_weather_station_relative_pressure') | float < 1005 and states('sensor.home_weather_station_humidity') | float > 85  and is_state('sun.sun', 'below_horizon') %}
  cloudy
{% elif states('sensor.home_weather_station_solar_radiation') | float > 10 and 
states('sensor.home_weather_station_solar_radiation') | float <= 100 and 
states('sensor.home_weather_station_uv_index') | float <= 3 %}
  cloudy
{% elif states('sensor.home_weather_station_solar_radiation') | float > 100 and states('sensor.home_weather_station_uv_index') | float <= 3 %}
  partly-cloudy
{% elif states('sensor.home_weather_station_wind_speed') | float > 40 and states('sensor.home_weather_station_rain_rate') | float > states('input_number.rain_rate_rainy') | float %}
  stormy
{% elif states('sensor.home_weather_station_wind_speed') | float > 40 %}
  windy
{% elif states('sensor.home_weather_station_uv_index') | float <= 1 and states('sensor.home_weather_station_solar_radiation') | float < 100 and is_state('sun.sun', 'below_horizon') %}
  clear-night
{% else %}
  {{ states('weather.ipma_weather_daily') }}
{% endif %}) renders=6294> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.home_weather_station_wind_speed', 'input_number.rain_rate_pouring', 'input_boolean.weather_stations_is_installed', 'sun.sun', 'input_number.rain_rate_rainy', 'sensor.home_weather_station_rain_rate', 'sensor.home_weather_station_relative_pressure', 'sensor.home_weather_station_uv_index', 'sensor.home_weather_station_humidity', 'sensor.home_weather_station_solar_radiation'}) rate_limit=None has_time=False exception=None is_static=False>
2024-10-25 19:02:56.141 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({{ 'on' in area_entities('Kitchen') | select('match', 'light.*') | map('states') 
   or
   'on' in area_entities('Living Room') | select("match", "light.*") | map('states')
   or
   'on' in area_entities('Dining Room') | select("match", "light.*") | map('states')
   or
   'on' in area_entities('Entrance') | reject("match", ".*econdary.*") | select("match", "light.*") | map('states')
   }}) renders=38> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'light.kitchen_light'}) rate_limit=None has_time=False exception=None is_static=False>
2024-10-25 19:02:56.141 CRITICAL (SyncWorker_1) [homeassistant.components.profiler] RenderInfo object in memory: <RenderInfo Template<template=({{ 'on' in area_entities('Master Bedroom')  | reject('match', '.*controller.*')| select('match', 'switch.*') |
   map('states') | reject('in', ['unavailable', 'unknown', 'none']) 
   or 
   'on' in area_entities('Master Bedroom') | reject('match', '.*remote.*')  | select('match',
   'light.*') | map('states')| reject('in', ['unavailable', 'unknown', 'none'])  }}) renders=30>

I’m considering moving these templates to an automation that runs every minute, do you folks that would be better? at least has less updates.

Do whatever you want to do, just understand that it will only reduce you to 1440 updates a day. Also, these templates won’t cause memory leaks (with or without your changes) because they aren’t creating runaway data. More renders will typically increase your CPU usage, not memory.

1 Like

I’m also facing a severe memory leak, with the usage growing from 1.9GB to 3.3GB within 3 hours (I added an automation to restart the host, before it gets stuck on swap).

I ran the profiler for an hour, and these were the largest diffs (aggregated and sorted):

('coroutine', 1707249, 614890)
('Context', 580482, 210352)
('method', 586198, 206621)
('Task', 569158, 205032)
('FutureIter', 569132, 205029)
('builtin_function_or_method', 581303, 205002)
('Future', 569166, 204961)
('ReferenceType', 602029, 204960)
('TimerHandle', 6322, 4733)
('State', 5953, 1783)
('tuple', 155190, 1410)
('dict', 181399, 1135)
('ReadOnlyDict', 10589, 778)
('Element', 6412, 645)
('Handle', 326, 218)
('CaseInsensitiveDict', 465, 145)
('BLEDevice', 476, 77)
('BluetoothServiceInfoBleak', 472, 76)
('deque', 1295, 73)
('partial', 6488, 72)
('frame', 59, 59)
('AdvertisementData', 148, 57)
('traceback', 58, 44)
('DNSAddress', 66, 36)
('SaveUpdateState', 36, 36)
('memoryview', 47, 32)
('managedbuffer', 43, 32)
('InstanceState', 103, 31)
('TemplateState', 57, 30)
('States', 55, 27)
('WSMessage', 84, 25)
('TransportSocket', 101, 23)
('_SelectorSocketTransport', 89, 23)
('KeyedRef', 824, 22)
('SelectorKey', 121, 21)
('socket', 131, 20)
('StreamReader', 32, 20)
('HassJob', 4266, 19)
('lock', 599, 19)
('CIMultiDict', 255, 19)
('ResponseHandler', 64, 19)
('HttpResponseParser', 64, 19)
('MemoryBIO', 38, 18)
('TimerContext', 63, 17)
('ReceiveMessage', 82, 15)
('LogEntry', 25, 15)
('StateAttributes', 12, 12)
('Struct', 1021, 11)
('DenonAVRTelnetProtocol', 11, 11)
('frozenset', 6975, 10)
('DNSNsec', 42, 10)
('UrlMappingMatchInfo', 10, 10)

I’m not sure what to do with it, as nothing seems glaring.

Looks like something is creating a massive amount of tasks and futures. That probably means it’s also using a lot of cpu time which might make it easier to track down.

Try running the profiler.start service and looking at the call grind file in qcachegrind. You can likely trace it back to the integration creating the most tasks.

If you are stuck post the call grind here and I’ll dig through it

Thank you!
See the call grind file here.
IIUC, create_task is almost entirely called by denonavr.api.DenonAVRTelnetApi._handle_disconnected.
I’ll try disabling that integration.

It sure looks like there is no guard to prevent that from being called if a task is already create and not done(). Did you open an issue for the library?

Yes, the library owner has already committed a fix (though no new release yet).

I’m wondering if there is a way for HA to be more defensive, by tracking memory usage per integration. It could be far easier to pin-point issues, and HA could also disable integrations in case of such anomalies.