History tab not working (mariadb)

I been using home assistant for about a year with the default sqlite database and the hisotry tab kept breaking every few days and then I’d just delete /config/homeassistant_v2.db which would fix it for a few days before I had to redo the whole process.

A while back I finally switched to the mariadb addon for recorder and history was finally working properly, well until today. As of today the history tab just keeps loading forever as it used to do.

Deleting homeassistant_v2.db doesn’t fix it anymore obviously and there doesn’t seem to be anything wrong in the mariadb log.

I can see history of individual entities just fine and the logbook is working as well. The only thing that’s not working is the full history panel, which I use quite a lot and I got no clue how to fix it.

Tried restarting the server a couple times, calling the recorder.purge service, nothing. Won’t budge.

Any ideas?

PS. Apologies if I’m posting this in the wrong category, but not sure where else I’d post it.

Ok, nevermind, after calling recorder.purge with days to keep set to 3, it finally worked again.

Since mariadb’s logs were unaware of any issues, I’m inclined to think home assistant isn’t capable of reading large history databases apparently? It had probably 10 days of data in it.

Set my recorder integration purge_keep_days to 7 now and will see how it goes.