Error: Recorder could not start

Hi everyone, I’ve run into a problem with the recorder. Last night Home Assistant wasn’t responding and after a couple of minutes rebooted itself. Automations resumed and I thought it was ok until it happened again this morning.

There is a notification saying the recorder could not start, which has a flow on impact that the following integrations and platforms could not be set up:

  • record
  • history
  • logbook
  • energy
  • default_config

A couple of weeks ago I started using MariaDB and everything seemed to be working fine. I haven’t installed any addons or new integrations in the past week.

Current version details below:

Home Assistant 2023.10.5
Supervisor 2023.11.3
Operating System 11.0
Frontend 20231005.0 - latest

It seems to be related to the MariaDB connection. Here are the logs for recorder:

I clicked through “error during connection setup” and it has this:

Here’s a full copy of that error:

Logger: homeassistant.components.recorder.core
Source: components/recorder/core.py:924
Integration: recorder (documentation, issues)
First occurred: 10:46:42 AM (10 occurrences)
Last logged: 10:47:09 AM

Error during connection setup: (MySQLdb.OperationalError) (2002, "Can't connect to server on 'core-mariadb' (115)") (Background on this error at: https://sqlalche.me/e/20/e3q8) (retrying in 3 seconds)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 145, in __init__
    self._dbapi_connection = engine.raw_connection()
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3288, in raw_connection
    return self.pool.connect()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 452, in connect
    return _ConnectionFairy._checkout(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1267, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
    rec = pool._do_get()
          ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 169, in _do_get
    with util.safe_reraise():
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
    return self._create_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
    return _ConnectionRecord(self)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 678, in __init__
    self.__connect()
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 902, in __connect
    with util.safe_reraise():
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 637, in connect
    return dialect.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 615, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/MySQLdb/__init__.py", line 121, in Connect
    return Connection(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/MySQLdb/connections.py", line 193, 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 924, in _setup_recorder
    self._setup_connection()
  File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1397, in _setup_connection
    Base.metadata.create_all(self.engine)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/schema.py", line 5813, in create_all
    bind._run_ddl_visitor(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3238, in _run_ddl_visitor
    with self.begin() as conn:
  File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3228, in begin
    with self.connect() as conn:
         ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3264, in connect
    return self._connection_cls(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 147, in __init__
    Connection._handle_dbapi_exception_noconnection(
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2426, in _handle_dbapi_exception_noconnection
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 145, in __init__
    self._dbapi_connection = engine.raw_connection()
                             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3288, in raw_connection
    return self.pool.connect()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 452, in connect
    return _ConnectionFairy._checkout(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1267, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 716, in checkout
    rec = pool._do_get()
          ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 169, in _do_get
    with util.safe_reraise():
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 167, in _do_get
    return self._create_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 393, in _create_connection
    return _ConnectionRecord(self)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 678, in __init__
    self.__connect()
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 902, in __connect
    with util.safe_reraise():
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
    raise exc_value.with_traceback(exc_tb)
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 898, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 637, in connect
    return dialect.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 615, in connect
    return self.loaded_dbapi.connect(*cargs, **cparams)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/MySQLdb/__init__.py", line 121, in Connect
    return Connection(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/MySQLdb/connections.py", line 193, 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)

Hoping someone can help me debug this as I’m stumped and can’t work out what to do next. Thanks in advance for any advice!

EDIT: I have restored a back-up from before this issue occured and but the issue persists.

Is the MaiaDB addon running?

1 Like

Hi Tom, yes it is. I checked the logs earlier and they were empty, but I just did a restart and this is what’s showing in the MariaDB logs now.

2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_REUSE_DYNAMIC due to corruption on [page id: space=51, page number=11793]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=51, page number=11793]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 11793 from file './homeassistant/state_attributes.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_REUSE_DYNAMIC due to corruption on [page id: space=51, page number=11817]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=51, page number=11817]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 11817 from file './homeassistant/state_attributes.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=51, page number=11825]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=51, page number=11825]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 11825 from file './homeassistant/state_attributes.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=53, page number=931]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=53, page number=931]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 931 from file './homeassistant/event_data.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [Note] InnoDB: Set innodb_force_recovery=1 to ignore corrupted pages.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5443]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5443]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5443 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5455]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5455]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5455 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5463]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5463]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5463 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5479]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5479]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5479 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5488]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5488]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5488 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5274]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5282]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5274]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5274 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5289]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5289]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5289 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5292]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5292]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5301]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5292 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=61, page number=5304]
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5304]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5301]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5301 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5304 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=61, page number=5282]; set innodb_force_recovery to ignore
2023-11-20 14:29:49 0 [ERROR] InnoDB: Failed to read page 5282 from file './homeassistant/statistics_short_term.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:49 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-11-20 14:29:49 0 [Note] InnoDB: Starting shutdown...
2023-11-20 14:29:50 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-11-20 14:29:50 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-11-20 14:29:50 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-11-20 14:29:50 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-11-20 14:29:50 0 [ERROR] Aborting
[14:29:51] INFO: Service mariadb exited with code 1 (by signal 0)
[14:29:52] INFO: Starting MariaDB
2023-11-20 14:29:52 0 [Note] Starting MariaDB 10.6.12-MariaDB source revision 4c79e15cc3716f69c044d4287ad2160da8101cdc as process 22861
2023-11-20 14:29:52 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-11-20 14:29:52 0 [Note] InnoDB: Number of pools: 1
2023-11-20 14:29:52 0 [Note] InnoDB: Using ARMv8 crc32 instructions
2023-11-20 14:29:52 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
2023-11-20 14:29:52 0 [Note] InnoDB: Using Linux native AIO
2023-11-20 14:29:52 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-11-20 14:29:52 0 [Note] InnoDB: Completed initialization of buffer pool
2023-11-20 14:29:53 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1305401667,1305401667
2023-11-20 14:29:55 0 [Note] InnoDB: Starting a batch to recover 2671 pages from redo log.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=50, page number=7864]
2023-11-20 14:29:56 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=50, page number=7864]; set innodb_force_recovery to ignore
2023-11-20 14:29:56 0 [ERROR] InnoDB: Failed to read page 7864 from file './homeassistant/states.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Not applying INSERT_REUSE_DYNAMIC due to corruption on [page id: space=51, page number=11793]
2023-11-20 14:29:56 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=51, page number=11793]; set innodb_force_recovery to ignore
2023-11-20 14:29:56 0 [ERROR] InnoDB: Failed to read page 11793 from file './homeassistant/state_attributes.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Not applying INSERT_REUSE_DYNAMIC due to corruption on [page id: space=51, page number=11817]
2023-11-20 14:29:56 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=51, page number=11825]
2023-11-20 14:29:56 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=51, page number=11817]; set innodb_force_recovery to ignore
2023-11-20 14:29:56 0 [ERROR] InnoDB: Failed to read page 11817 from file './homeassistant/state_attributes.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=51, page number=11825]; set innodb_force_recovery to ignore
2023-11-20 14:29:56 0 [ERROR] InnoDB: Failed to read page 11825 from file './homeassistant/state_attributes.ibd': Page read from tablespace is corrupted.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Not applying INSERT_HEAP_DYNAMIC due to corruption on [page id: space=53, page number=931]
2023-11-20 14:29:56 0 [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.
2023-11-20 14:29:56 0 [ERROR] InnoDB: Unable to apply log to corrupted page [page id: space=53, page number=931]; set innodb_force_recovery to ignore
2023-11-20 14:29:56 0 [ERROR] InnoDB: Failed to read page 931 from file './homeassistant/event_data.ibd': Page read from tablespace is corrupted.

EDIT: Ok so some further digging, I suspect the DB isn’t actually included in my Google Drive Back-ups. MariaDB is included as an addon, but I’m not clear if the back-up is taking the DB data or just the addon fiiles and config but excluding the DB.

How can I confirm this?

When I installed MariaDB, I also installed InfluxDB and Grafana. The Grafana dashboards are still working so it looks like values are being pulled into the InfluxDB even though MariaDB isn’t working.

I’m thinking the simplest thing to do might be to reinstall the Maria DB addon?

Yeah your database is corrupt. Reinstalling would be the easiest. You could also try to repair it using the phpMyAdmin addon. I have no idea how though. You will have to search for that info.

A full backup should include all addons and their data. You can open the backup archive with winzip or similar to look inside.

1 Like

You’re right, it did contain the DB which is handy.

I’ve restored to a couple of days back and everything seems ok for the moment.

Any ideas what might cause the DB to become corrupt? Trying to understand in case there’s something I can do to prevent this in the future.

An unexpected disconnection or power loss could cause it.

No worries. I’ll continue to do my nightly backups and hopefully it doesn’t happen again. I guess I should only worry if it becomes a frequent occurence.

Thanks for your help!

Would anyone be able to direct me to where mariadb database is stored because I have tried to reinstall it and still get the same error my assumption is when I uninstall it isn’t deleting the database and as I have a backup of the file I could just drop the backup in there

The database is in the addon container. It is deleted when the addon is uninstalled.

Thank you for confirming