History page don't work

Hello all,
since this morning the History page is blank with a wheel spinning in the center. I don’t know what happened and why he does it, but it doesn’t seem normal for me. Can someone help me?
Thanks in advance.

Spinning wheel mean loading?

What hardware? On my RasPi history loading took forever. On x86 it’s faster.

Usually it doesn’t take long, it’s pretty fast. But as of this morning it’s still loading and it worries me. HA is mounted on the NAS Synology docker.

1 Like

After several hours it started working again. It is likely that the DB has become too big and it takes time to reorganize it. Now I am wondering if it is possible to limit History DB to a shorter period than the default (which I don’t know what that is). Anyone have any idea?

Props for the forums search / topic recommendation when creating a new topic, because… I wanted to create a similar topic “History page loading forever / not showing any entity anymore” 2 minutes ago.

Same for me. Page loads like forever (tested 15 min. +), not showing ANY entity. When it was working it took some time to load, yes, probably 10 to 20 seconds I don’t really remember. Now: nothing.

I had a minor database issue the last days but that got sorted.

  • PRAGMA quick_check;: fine
  • PRAGMA integrity_check;: fine
  • PRAGMA foreign_key_check;: fine

Anything else I can check? What are the URL parameters to select a specific time range? Default seems to be latest 3 full hours. I’d like to try a very short time frame like 15 minutes or something to further “debug” the situation.

  • Running HA 2021.12.10.
  • I don’t remind when history page was still working or when it stopped working.
  • Restart of HA didn’t help.
  • History page is loading for single entities (using more info → show more).
  • Logbook is working just fine.

Any idea from anyone? :confused: :persevere: :face_with_monocle:

Same for me happened this morning.
Just a circle and “loading“.

Just an update. 4 hours later
Now history data is loaded and showing up correctly.

Did you let the page load for 4 hours or did you try again after 4 hours?

Mine‘s definitely not working even when trying after many hours.

Others might have a look at https://github.com/home-assistant/core/issues/64328.

Hi,

I had the same problem and found a solution which I posted in another thread. The good news is that it seems to be a permanent fix.
Hopefully it will work for you too.

For me, it meant that the database size grew too large. Shrinking it fixed it. See the post that I linked to below.

Thank you. So what to look at / what is “too large”? Mine

  • has 2.3 GB in total (which is not that much)
  • with a purge_keep_days: 14 recorder setting
  • being purged every night and repacked (“shrinked”) once a week.

Statistics of course sum up. What did you change in detail? SQLite/default database?

I am writing to a MySQL database residing on separate system. I made this change ages ago based on concerns with SQLite consistency. I do not remember the exact DB size.

My specific changes were:

  • Reviewed and excluded items that had most DB entries that were not relevant as described here.
  • Decreased purge_keep_days to 7

Once I made those changes, I had waited overnight for the purge to run.

Quick note:

After updating to HA 2022.2.9 history page works - somehow. Depending on the client/app/browser it initially takes 3 seconds to load, than starts to show first dozens of entities. On some devices/browsers remaining content is loading for about a minute until aaaaall the entities can be shown and scrolled. This even triggers browser tab warning in Firefox because it puts a lot of load to the browser.

Short: So the frontend update contained in HA 2022.2.9 improved things - even it’s still not perfect (quick and smooth) as it has been some time ago.