Recorder queue reached the maximum size of

This morning I noticed that the energy dashboard stopped recording data starting at 2:51AM, the RPi sending the energy data was still doing it’s thing so it wasn’t going wrong there, a quick look in the HASS OS (2021.9.7) log resulted in finding this:

“ERROR (MainThread) [homeassistant.components.recorder] The recorder queue reached the maximum size of 30000; Events are no longer being recorded”

Since I could not find anything about this error in the docs and Google didn’t help either, I did a reboot and now the energy dashboard is picking up data again.

Do I have to reboot HASS OS everytime this error appears?

2 Likes

I had the exact same thing around the same time on HASS OS 2021.10.6.
Maybe it had to do with the shift from summer to wintertime?

Seems like more people are experiencing this problem.

1 Like

Same here, running Supervised on 2021.10.6 with MariaDB.

Same issue here, running HA 2021.10.6 in Docker with PostgreSQL database backend. I also assumed an issue moving from British Summer Time to GMT.

1 Like

Oh, I’ve been trying to figure out for the last 10 minutes why I have a load average of 3 and a core that is always at 100% lol.
Like you, the recorder displayed this error at 2:03 am.

I can’t post captures as a new registrant, but I did contact :

  • That the pi immediately went up in temperature just before it stopped recording data
  • That it was the core container that was consuming 100% on at least one core cpu.
  • That in this container it is the command python3 -m homeassistant --config /config that consumed all this CPU.
  • That a reboot of the core seems to solve the problem.

Yes same here, perhaps have to schedule a core reboot after any daylight saving time change?

Same here. Recorder crashed, emitting the said error message, and CPU was running constantly since. Rebooting of core solved issue. Amazing how something like this has been overlooked and not fixed. This can’t be the first DST-change for Home Assistant.

Yes, as usual the users have to fix basic stuff with Home Assistant themselves. Same thing with (non-existing) log rotation that keeps filling the SD-card with 500mb/day.

It did not happen last year, or the year before.

Unbelievable. A simple DST change broke everything.
I have the exact same error in logs but a slightly different behavior: When I noticed the error the CPU usage wasn’t spiking, but only RAM usage was very high (I’ve placed Recorder to RAM). I don’t recall the same thing happening last year when the time changed.

Same here. Entire HA system crashed (running pre-built image on VMware VM) Had to hard-boot the VM.
Seems to be ok now - didn’t happen last year.

Yea same here however I have no excess CPU drainage.

Not the only one having issues

Erik, how do you solve this issue?

It looks likely - though not confirmed, that the problem was caused by something that has gone wrong with the code that handles the time pattern trigger in automations. My log is filled with thousands of entries complaining that automations could not be started because they were already running (single mode). But every affected automation it has tried to start about 20 times every second between the “new” 1am and 2am. Once it reached 2am, things returned to normal.

Because the recorder now stores traces for the automations, every attempted run it has tried to store in the recorder, and clearly the recorder could not keep up with the requests. We all have the same error - 30,000 queued events and the recorder gives up and doesn’t attempt to reconnect.

My log file was 127mb.

( Same reply to @gordonpm )

But the db handling has been recently mucked with and long term stats were added since last year.

I’m not saying it’s the reason but it’s very possibly related.

I’ve found this thread because I have the same problem. All of my HomeAssistant graphs stopped being recorded when the clocks moved. Is there any solution for this yet?

Reboot HA seems to fix it for people.

2 Likes

Same here … a reboot fixed the problem for me but the size of my database increased dramatically when I restarted HA at 10:00:

image

If like a lot of us, you had automations that ran 20+ times a second for the entire repeat hour (my log has complaints about an automation trying to run that was already running - 286 thousand times), that will be a lot of additional entries in the database.