Hassbian 0.89.2: SSH, WinSCP And HA WebUI-Config/Info Super Slow

I started to notice lately that my RaspPi3B+ was running very slow (even though cpu usage was less than 6%) . In the past a simple reboot solved this problem. Currently, within minutes after reboot the PI slows down so bad I can barely connect via SSH or WinSCP. Both may timeout before a connection is established. Selecting the Configuration menu option or clicking th"I" icon within the WebUI results in extremely slow loading page(s). The homeassistant log tell me nothing. I did have System Health enabled but likewise, nothing unusual was reported.

This PI is only used for HA and if I have something else installed on it has been there for ages because I havent made any significant changes/additions recently. The last thing I changed (As I recall) was playing around with Lovelace and enabling System Health (which I since disabled).

Has anyone else noticed a slowdown lately? If not, can someone tell me where I should be looking.

Much appreciated.

If I remember right, this is when I researched log, history & recorder. Now I exclude tons of stuff I don’t need a history on. I think when I set up history & recorder in my configuration I also deleted the database file.

Can you elaborate on this? I understand how to exclude certain entities via the Recorder but unless I exclude all entities I still have a DB. Did you remove history/looging/recording in its entirety and if so, how?

Sure I can try. I deleted my database to get rid of all the history that I had been accumulating that I didn’t need or want. As soon as you do a HA restart it comes back. I think it even says something in the log to that effect.

There’s a number of things you could try.

If you have Pixel the desktop installed on your Pi disable it. This will free up resources.

You could sudo apt update/upgrade your Pi. I’d take an image of your SD card before doing this.

Test your connection between your Pi and your router.

Delete your Hass DB. Stop HA before doing this. Once done and before you restart HA disable Logbook in the configuration.yaml

You could try the above and checking performance for each step you take.

Ok, I think I misunderstood you. I thought you got rid of the DB alltogether. Yeah, once you delete the DB, HA creates a new one right away. You dont have to do a restart.

What I thought you meant was that you stopped looging/recorder completely. I would consider that as I never use the history and the logging option takes forever to load. What I may try is limitting the Recorder for only 2-3 days with: purge_keep_days: 3

I think that is something i’d like to try. I commented out the logger: and recorder: in the config file but it appears they are still running even after a reboot. Is there something I need to do the specifically disable these options??

That would probably work but I was impatient waiting for a few days to see if that solved my problem. Did you delete the DB file/restart to see if that fixed your original problem?

Yes I did and in the past this definitely resolved the problems. Something definitely not right at this moment. The DB also appear to be growing way too fast. Something is causing a lot of activity I just cant figure out which. I may have to start disabling one device after the other until I find the culprit(s) if any :frowning:

The only other thing I can think of is to check the log to see if a breaking change caught you. Couple of releases back the time parameter changed resulting in breaking many of my automations. Is the log clear?

Do you have any components in your configuration.yaml that are making web calls and getting no responses. An example would be a camera that is turned off yet HA is constantly trying to establish a connection and getting no response.

Another possibility is a device that is constantly being discovered. The Discovery process isn’t perfect at the moment. Disabling this as an experiment might help with your problem. It’s down to trial and error really.

Check your HA log file a little closer for an answer.

Well I disabled a custom component and that seemed to have done the trick. Problems is I made a few minor changes before and after disabling the component so… Dont really want to point fingers therefore the component will remain unnamed for now. I’ll leave it disabled for a few days then re-enable it to see if my problem comes back. For now, things appear normal.

Thanks everyone for your advise