I see an increasing number of people complaining that Recorder is turning itself of due to the write buffer filling up during (Mariadb) database backups. This is typically hitting people that use energy monitoring (e.g. Tibber) that logs multiple complex events each second. (The existing 90% protection in Recorder does not have time to react.)
I suggest increasing the value of MAX_QUEUE_BACKLOG in components/recorder/const.py or, preferable, making it configurable. (An alternative would be to enable proper online backups of MariaDB that will not block Recorder from writing.)
Hello, yes this is what we need, I face the issue of “The recorder backlog queue reached the maximum size of 40000 events” once every few weeks. I’ve tracked it and it appears that it happens during Home Assistant database purge which apparently blocks all access to database. I have MariaDB and my database is huge and this purge is taking about 2 hours to complete and backlog queue lasts only for about 1 hour.
On the other hand my machine has plenty of ram and I’ve noticed that during this “blockade” ram usage only increased by about 2%, I could easily allocate 20% of ram for this purpose only to prevent recorder from stop recording, so this feature is very much needed.
Have a good day.