Error: The recorder queue reached the maximum size of 30000; Events are no longer being recorded

Hi,

I am runing home assistant with external mysql server, and recently the below error shows up daily and cause the system rebooting. It was running fine and no error showing in the mysql server. I have energy dashboard setup, maybe it’s related to this issue?

Can you please help? Thanks in advance

04/11/2022 Update: I have noticed that, for 3 weeks, the error only happen at weekends, starting around 4:30pm and the system will restart at around 5:45pm. It does not happen on weekdays, very interesting! Updated to newest version today and will see if this will goes away.

Your recorder has to record to many events and states (to write them into the Database). I solved this by excluding certain things from recorder. If you don’t manage what you want to record your Database will quickly become several GB big.

Here is the solution petro suggested, did just that and works just fine now:

1 Like

thanks for providing a solution. But my machine is powerful enough and there is more thank enough storage space. Is there another workaround?

Check your connection to your external DB, and in DB, in regards to why the Queue is “building up” , sounds to me like Recorder can’t get rid of the records, in time matter
… I don’t know how many Entities you have configured in Energy dashboard, but a “default setup” with only 1-2, should not cause this, and i also don’t know your definition of “recently” … around xmas/newyear, Recorder started to record all “Events” and all “state-changes” … so if you have a-lot Devices/entities, you should look deeper into above “suggested solution” ( everything is Recorded, unless specified other-vice, in configuration.yaml

Hi,

The issue happened since a month ago and there are quite a lot of devices for my setup. For the energy dashboard, the data rate is real time and approximately 2 to 3 data points every second.

It probably also related the daylight saving time change according to other posts




Update: I have noticed that, for 3 weeks, the error only happen at weekends, starting around 4:30pm and the system will restart at around 5:45pm. It does not happen on weekdays, very interesting! Updated to newest version today and will see if this will goes away.

by the way, after I reboot home assistant, the recorder start to work again, it will last for half day then it will stop eventually. So I think there is no issue with the external DB server.

ok, i’ll take a look at the “daylight syndrome”, thou if those pics are your system, that seems not to “overload” the Recorder, beside i would have increased Disk-size, even thou it’s not related to this ( BUT don’t stare blind of the “Disk Used” in second pic, as it has no relevance to how your diskspace looks like)

Hmmm seems like quit q few have experienced same yes … and in different versions of HA

Here is a pic of the external DB server, it’s solely used for this purpose. There is more than enough disk space. It’s working fine and I haven’t make an change to it.

yes, thou i was thinking, that it might be a performance issue in regards to Recorder beeing able to write to the DB, in time matter … but seems more like a common thing is that i.a. automations etc. is “loaded/running” multiple instances of same, so could be related to “daylight savings” as an “unsolved” bug was reported in late oct/nov.

PS: you could try to “disable” all your automations ( for problem identification purpose only ) see if it’s affected

EDIT2: i would also check/make sure timesettings are identical on HA+(HOST) vs DB+(HOST)

it can be a good try but disabling all automations for half day may not be a good idea for me. below is some of the logs just before this error happened





the date and time setting are identical in both systems as well as the timezone.

ok, yes and your "error"messages seems common with all others “reports” integrations failing 1 after 1, until Recorder Crash :frowning: … and all seems have various systems, various DB’s etc … i really can’t see any “common” reasons, other that it could be something “triggered” by Daylight Saving Changes … and noone seems to found any “Solutions” either … Sorry i can’t be of more help, thou im so damn curious, so i will continue looking for an “Answer” :slight_smile:

PS: Thou strange people have been quite since oct/now … if your not on latest and greatest (update) then do, and maybe “wait it out”, some solved it by restart, others not, it seems …

PS2: i Do know HA Dev team currently/lately is working on adapting to ISO standard for time, and that Core is UTC … which causes “weird” conversions in i.e automations, that could made them running “Double” instance, as some have experienced, so i was thinking that maybe a check in start-up file, and event’s could reveal if “something” is running in “parallel”

Those devices are wifi swiches and plugs, which caused by wifi interference making them losing connection. Let me try to fix them first. But still, losing connection to these wifi devices should not cause the recorder to crash.

thank you very much for trying.

1 Like

Yes i don’t think it’s your devices or other wifi interference … and i don’t run MQTT-Broker, Deconz, or Let Encrypt, so i don’t know how they can affect events/states … but keep an eye on your logfile, as it most like keeps increasing fast without restart, and i noticed you only have 30GB disk -size

Have a look here ( specific lets-encrypt solution)

But also (if not already) hard reboot HA + DB … i mean even the Hosts the “nest” on

yes, I rebooted the host but still the same issue, I don’t have lets-encrypt setup.

It would be helpful to see how you configured your recorder and database. Maybe post the relevant part of the config here.
A problem that I also encountered while setting up my database was that I accidently limited the amount of connections and queries.
What database are you using, how are you configuring the database? The problem is not, that you machine isn’t powerful enough the problem is that the recorder reached it’s maximum que so something is preventing your messages from being sent.

You could try limiting the events that get sent out or the interval in which they are sent out to try and see if this happens regardless of how much information you are trying to pump out of homeassistant into you DB.

Another thing you could do is include this iny our config:

logger:
default: warning
logs:
homeassistant.components.recorder: debug

To see if you can get some info on how your recorder is behaving and what might be causing the issue.

No (real) solution yet? I’m having the same issue…

Update: I have noticed that, for 3 weeks, the error only happen at weekends, starting around 4:30pm and the system will restart at around 5:45pm. It does not happen on weekdays, very interesting! Updated to newest version today and will see if this will goes away.

another time happened for the same error, which is only happen on weekend. Hope someone can help. thanks.