I assume you have looked at the url in the error message.
sqlite is a single user and quite simple database. It can get overwhelmed by too many operations. Particularly on a RPI (if that is what you are using).
Sounds like your system is quite busy. I got this when I started using the ubiquiti presence detector, there was constant writing to the db and I gave up on it.
Well something is preventing home assistant from accessing the db. There are plenty of reasons that might be so, failing disk, system too busy, too many processes trying to write simultaneously. Hard to say.
Ah, OK. I changed it and restarted the DB and HA. All is well.
In fact it is better than well.
For the first time in longer than I can remember the only warnings I have in the log are for custom components. No SSL errors. No xxxx is taking longer than 10s to set up etc…
Yeah… my errors in the log are down to nothing as well… so my interpretation was correct then. One of the issues I often have with docs is they will have some random setting and then give no example of how to use it or if there is an example, they don’t use the setting. A classic is when they telly you there are a few different ways to configure something and then give the 3 configurations and they are all ‘different’ which makes it hard to follow… anyway I’m sure I sucked at explaining that… Glad you got it working.
I did agonise over the host but in the end just followed verbatim the example (except username/password). Your approach could just as easily have been right.
I had been on 0.77.2 and recently added a few history_stats sensors. I did not see this problem. Then yesterday I updated to 0.81.6 and boom!, my log was loaded with these errors! I’ve since disabled discovery (which I have no use for) and slowed down the history_stats sensors (by specifying larger scan_intervals.) Now I still see these errors, but not nearly as often. Maybe finally time to bite the bullet and switch to something other than SQLite.
BTW, now that I’m on 0.81.6 all the timer out of sync errors are gone that I used to see a lot. But of course, they’ve just morphed to events, which I still see. Interestingly, now that the events show how much the timer tick was delayed, I’m amazed that the times are so big. Before turning off discovery it was not uncommon to see delayed ticks of up to 10 seconds! Now I’m seeing fewer and they’re more around 2 seconds. Still, for something that is supposed to happen every second, to be delayed by 2 seconds is nuts! FWIW, I’m on a pi 3B. And here are the events from the last 10 minutes:
FYI, I went ahead and changed to MariaDB. I don’t use hassio so I had to manually install it and create the database, which took a bit of reading/Googling. After restarting things do seem better. It’s only been a short time, but already I don’t see database errors anymore. Also, I’ve only seen one timer_out_of_sync event each time I restart (which so far only seems to happen during startup), and they’ve been just over 2 seconds. I just enabled the memory_use_percent and processor_use sensors, so I can update you on what I see after a while.
thanks, i have same settings except use % for host. Thought that to be necessary when using more than 1 instance accessing the db. (I have 2 HA setups)
do you logbook and history tabs work alright? Mine grind the Ha instance to hold due to memory depletion…
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.
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.