I see since last week those errors:
2024-11-14 21:16:46.240 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-11-14 21:16:46.343 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-11-14 21:16:46.444 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-11-14 21:16:46.444 ERROR (Recorder) [homeassistant.components.recorder.core] Unhandled database error while processing task <Event state_changed[L]: entity_id=sensor.energy_weekly, old_state=<state sensor.energy_weekly=411.128; state_class=total_increasing, status=collecting, last_period=846.467, last_valid_state=0.303, last_reset=2024-11-10T23:00:00.043272+00:00, next_reset=2024-11-18T00:00:00+01:00, unit_of_measurement=kW, device_class=power, friendly_name=Energy weekly @ 2024-11-14T21:16:39.414575+01:00>, new_state=<state sensor.energy_weekly=411.129; state_class=total_increasing, status=collecting, last_period=846.467, last_valid_state=0.304, last_reset=2024-11-10T23:00:00.043272+00:00, next_reset=2024-11-18T00:00:00+01:00, unit_of_measurement=kW, device_class=power, friendly_name=Energy weekly @ 2024-11-14T21:16:45.759222+01:00>>
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
self._dbapi_connection = engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3300, in raw_connection
return self.pool.connect()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 717, in checkout
with util.safe_reraise():
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 715, in checkout
dbapi_connection = rec.get_connection()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 837, in get_connection
self.__connect()
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
with util.safe_reraise():
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 643, in connect
return dialect.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 620, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/MySQLdb/__init__.py", line 121, in Connect
return Connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/MySQLdb/connections.py", line 195, in __init__
super().__init__(*args, **kwargs2)
MySQLdb.OperationalError: (2002, "Can't connect to server on 'core-mariadb' (115)")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 874, in _process_one_task_or_event_or_recover
self._process_one_event(task)
File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1013, in _process_one_event
self._process_state_changed_event_into_session(event)
File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1108, in _process_state_changed_event_into_session
elif metadata_id := states_meta_manager.get(entity_id, session, True):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/states_meta.py", line 63, in get
return self.get_many((entity_id,), session, from_recorder)[entity_id]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/recorder/table_managers/states_meta.py", line 113, in get_many
for metadata_id, entity_id in execute_stmt_lambda_element(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 195, in execute_stmt_lambda_element
executed = session.execute(stmt)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2226, in _execute_internal
conn = self._connection_for_bind(bind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2095, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in _connection_for_bind
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 1189, in _connection_for_bind
conn = bind.connect()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3276, in connect
return self._connection_cls(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 148, in __init__
Connection._handle_dbapi_exception_noconnection(
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2440, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
self._dbapi_connection = engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3300, in raw_connection
return self.pool.connect()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 717, in checkout
with util.safe_reraise():
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 715, in checkout
dbapi_connection = rec.get_connection()
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 837, in get_connection
self.__connect()
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
with util.safe_reraise():
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 643, in connect
return dialect.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 620, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/MySQLdb/__init__.py", line 121, in Connect
return Connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/MySQLdb/connections.py", line 195, in __init__
super().__init__(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-11-14 21:16:46.450 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-11-14 21:16:46.551 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2024-11-14 21:16:46.654 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Ans this part is the log of MariaDB itself:
2024-11-14 21:16:46 0 [Note] Starting MariaDB 10.11.6-MariaDB source revision fecd78b83785d5ae96f2c6ff340375be803cd299 as process 315
2024-11-14 21:16:46 0 [Note] InnoDB: Compressed tables use zlib 1.3.1
2024-11-14 21:16:46 0 [Note] InnoDB: Number of transaction pools: 1
2024-11-14 21:16:46 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-11-14 21:16:46 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2024-11-14 21:16:46 0 [Note] InnoDB: Using Linux native AIO
2024-11-14 21:16:46 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-11-14 21:16:46 0 [Note] InnoDB: Completed initialization of buffer pool
2024-11-14 21:16:46 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
2024-11-14 21:16:46 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=87699569535
2024-11-14 21:16:46 0 [Note] InnoDB: End of log at LSN=87734077411
2024-11-14 21:16:46 0 [Note] InnoDB: To recover: 1956 pages
2024-11-14 21:16:46 0 [Note] InnoDB: 128 rollback segments are active.
2024-11-14 21:16:46 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
2024-11-14 21:16:46 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-11-14 21:16:46 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-11-14 21:16:46 0 [Note] InnoDB: log sequence number 87734077411; transaction id 12117232
2024-11-14 21:16:46 0 [Note] InnoDB: Loading buffer pool(s) from /data/databases/ib_buffer_pool
2024-11-14 21:16:46 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-11-14 21:16:46 0 [Note] InnoDB: Buffer pool(s) load completed at 241114 21:16:46
2024-11-14 21:16:46 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-11-14 21:16:46 0 [Note] Server socket created on IP: '::'.
2024-11-14 21:16:46 0 [Note] mysqld: ready for connections.
Version: '10.11.6-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 Alpine Linux
Can someone tell how to solve this?
Only what work is restart MariaDB every time