PSA: 2024.7 recorder problems

Thanks, I see the issue is connected with the SQLite version combined with old DB schemas and that some install methods had an earlier upgrade of SQLite, and now “we all got it” because of Alpine updates.

Have the same recorder issue and added “auto_purge: false” (without result).
But now I notice a higher power consumption, is that also related?
image
When recorder freezes, after restart, the CPU load falls to its normal value.

Read before ask could have helped me…

Opened up a pull request to block icloud3 from breaking the Home Assistant recorder:

4 Likes

Opened up a pull request to block older versions of places from breaking the Home Assistant recorder:

3 Likes

same thing happening here

I have the same problem with Home Assistant 2024.7.1

The recorder stops at 4:11 in the morning.
I have none of the mentioned integrations above installed.
Restarting Home Assistant solves the problem until the next morning.

Please InfluxDB is still recording and the data isn‘t lost using Grafana.

Please solve the problem as soon as possible.
I don‘t like loosing all data from my energy dashboard :flushed:

So you have the first issue. For which a temporary solution is available in the first post.

1 Like

Opened up a pull request to block older versions of hass-variables from breaking the Home Assistant recorder:

2 Likes

I think those three custom integrations cover the second issue set out in the OP.

The first issue has been fixed on dev, and will be shipped in 2024.7.2.

My goal is to ship it today.

…/Frenck

11 Likes

Will it (it being the SQLite DB rewrite) really be merged in 2024.7.2? The github issue still refers it to be a fix for 2024.8. Smart fix for the custom integrations :slight_smile:

Thanx for pointing out the temporary solution.
I added the lines to my configuration.yaml

Now I have seen that Frenck is working on a 2027.2 update.

I wonder if that solves the problem.
Do I have to delete the lines in my configuration.yaml after updating to 2027.2?

Yes, see:

3 Likes

Wonderful! :star_struck: This is very good! Thanks for the link and confirmation.

Yes you do.

1 Like

Done.

…/Frenck

4 Likes

I’ve read the release note. Is this going to result in a full states table rebuild for those of us on mariadb as well? It’s difficult to find any information because only sqlite has been mentioned in all the talk about this bug (and mariadb as far as I can tell from my own instance doesn’t seem to have any problems), but presumably this patch will change the database version number, so will affect those of us not using sqlite as well?

Thats good news, thanks!
I’ve two questions: is it possible to reactivate icloud3 again without locking up the database because just the requests are blocked?
And: if I would migrate from SQLite to MariaDB or Influx, would that help as well?
Thanks in advance.

The problem was unique to SQLite and did not affect MySQL/maria/postgresql so there is no table rebuild for those engines.

The SQLite states table rebuild does not increment the schema version since it’s not a change in schema, its only a table rebuild to remove the old legacy schema that some systems have since SQLite currently has no way to drop a foreign key without a table rebuild. If your system was created with newer schema, this issue would never happen. It only affected older systems.

The MySQL/maria/postgresql engines have a different issue where the recorder runs out of IDs, but that only happens when you record massive amount of data over a long time. That is fixed in 2024.8.x, and you will see a migration to schema 44 there for those engines but it’s very unlikely that you have this problem unless you record 100000+ states per day.

6 Likes

Thanks for confirming that, and providing a bit more insight into things. You’re a star.

Just installed 2024.7.2 and removed the workaround. But issue remains: recorder does not work (energy dashboard and history graphs stop showing data).

At reboot:

Logger: homeassistant.setup
Source: setup.py:406
First occurred: 19:55:29 (1 occurrences)
Last logged: 19:55:29

Setup of ‘recorder’ is taking longer than 300 seconds. Startup will proceed without waiting any longer


Logger: homeassistant.setup
Source: setup.py:248
First occurred: 19:55:39 (4 occurrences)
Last logged: 19:57:43

  • Unable to set up dependencies of ‘history’. Setup failed for dependencies: [‘recorder’]
  • Unable to set up dependencies of ‘energy’. Setup failed for dependencies: [‘history’, ‘recorder’]
  • Unable to set up dependencies of ‘logbook’. Setup failed for dependencies: [‘recorder’]
  • Unable to set up dependencies of ‘default_config’. Setup failed for dependencies: [‘energy’, ‘history’, ‘logbook’]

Logger: homeassistant.setup
Source: setup.py:271
First occurred: 19:55:39 (4 occurrences)
Last logged: 19:57:43

Setup failed for ‘history’: Could not setup dependencies: recorder
Setup failed for ‘energy’: Could not setup dependencies: history, recorder
Setup failed for ‘logbook’: Could not setup dependencies: recorder
Setup failed for ‘default_config’: Could not setup dependencies: energy, history, logbook