Graphs die / stop charting at 4am every morning

Starting about 3 days ago, without any configuration changes from me, home assistant “stopped graphing things” after 4am. Rebooting fixes it until 4am the following day, i have no idea why this has begun, and as of this morning ive created an automation that just reboots home assistant at 4:01am until i can figure out whatever is causing this issue.

its not a load thing, its not a storage space thing, i dont have any automated jobs doing anything at 4am, and it started after the most recent two home assistant updates (the 4th and 5th, i think).

Interestingly, all the sensors that generate the numbers for all the charts (literally all the sensors in HA) still report the current value. So looking at a dashboard without any graphs you wouldnt have any idea that theres something wrong - but for some reason at 4am every morning HA just ‘stops writing to its own history’. You can see live data, but from 4am onward, no historical data. its super bizarre.

is anybody experiencing the same thing?

Did you upgrade to 2024.7? Sounds like this:

Hi,
I have the same issue since 4 of july.

Same issue here.

Not often you get hits that have the answer on a super specific Google Search for Home assistant stops at 4am.

Will try @MattB314 answer and see how it goes.

This has happened to me as well. Exactly at 4:00 AM each day! I thought the latest 2024.8 release may help fix it but still seeing the issue today after updating yesterday.

It looks like the following bug was created (Purge causes recorder to stop writing to the DB until HA is restarted (Auto purge happens at 4:12am) · Issue #117263 · home-assistant/core · GitHub) and a solution ( Remove legacy foreign key constraint from sqlite states table by bdraco · Pull Request #120779 · home-assistant/core · GitHub) was merged / released with 2024.7.2 but I am still having this issues. I’ll post to that thread as well but thought I’d share a link to the “fix” and see if others still are having issues.

One note I called out, is that I have a non-standard time set for the recorder retention of 365 days. Not sure if that could still be causing an issue.