Home assistant database locked again

They load but take longer than I’d like (10-20s). Loading them takes my memory use from ~ 55% to ~ 65%.

I do make extensive use of the exclude option in both history and logbook though.

A yes, tried that too.
but I think I learned that doesn’t make any difference on the back end , only doesn’t show it in the frontend, while backend DB records anything. not sure though.

I use includes in recorder and history to try to calm it down, but it doesn’t really help at all.

Where do you get that nonsense from?

1 Like

FWIW, here’s my memory and CPU usage over the last week:

Memory usage is, of course, the top line, and starts around 36% and ends around 42%. Haven’t paid close enough attention to know what was happening during the temporarily increased usage periods.

1 Like

is that a click on more-info in Ha? or is this some other tool. My more-info screens never go past a day…?

It’s from the History page.

ah, well, that’s beyond reach in my 2 instances, and has been so for as long as I can remember…

After installation of MariaDB database may I delete home-assistant_v2.db file in /config ?

Yes you can.

Can you share a link about how to change database from the default to mariadb on a raspberry pi3?

Ok but i need to register myself in the mariadb site or do i need only that config?

If you are using Hassio just install the addon.

Still on hassbian !

It is in the docs.

I got this problem on my small installation of HassOS (Raspberry 4 with external USB 3.0 drive).

Switching to MariaDB solved* the issue and dramatically increased performance and UI responsiveness. In the Raspberry, at least.
12/feb/2021: The issue was probably the slow disk. In the end I discarded the Raspberry, switched to a HASSOS VM, and MariaDB is no longer needed.

That’s actually very fine. The more the database can store in memory, the quicker it works. It has a configured upper limit.

If you keep reading…

I am a little confused about how to configure mariadb database inside configuration.yaml in the recorder section. Can you share your configuration about this?

I can. See MariadB in docker issue - unconnected user unauthenticated host

1 Like