Very slow Home assistant

Hi, as of this afternoon my Home assistant is reaaaaallllllyyyy slow. Also is seems it is rebooting a lot. I know that because I get a telegram message when the system is rebooted. I have a raspberry pi4 8gb (less than 2 months old) and I use an SSD ( less than a year old. Any idea what it could be. I also tried reinstalling but the same issue. So it seems like it is not related to my install. Tested SSD and test shows no errors on the disk. How can I check if my pi died?

Hi. I just remembered I expanded the database size two days ago to 60 days. The database is a MariaDB on my synology. I did again a fresh install and restored a backup from before I expanded the database. Could this be the issue?

Check your logs.

Check your CPU and memory use.

Thanks for the reply. That is the problem. Everytime I ask to much from the system it starts to reload. Can view full log or download it. CPU temp I also can’t check. Now I’m using again my ‘old’ pi4 4gb and same issue.

If you have the SAMBA share or SSH add-on installed you can download the log here:

/config/home-assistant.log

You could also try re-starting in safe mode (disables third party integrations):

I will try that later. When I want to load full log or if I do something else that triggers a reload I get this error message.

Logger: aiohttp.server
Source: /usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py:421
First occurred: 07:06:49 (2347 occurrences)
Last logged: 07:07:08

Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py”, line 350, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “aiohttp/_http_parser.pyx”, line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
Invalid method encountered:

I have the full log. How can I share this. And can I safely share this, are there no passwords in it or something else?

Just started a fresh new install without using a backup. Still the same slow response. It is snappy for about half an hour and then it start to get very slow with constantly reload messages

So the config is not the issue, therefore it has to be hardware.

What power supply are you using?

The recommended power supply for the pi might not have enough capacity for a pi and an SSD.

To check the SSD there is an addon you can use:

1 Like

Hi, I use the official pi powersupply. It ran in this config for a couple of months without any issues. But I wil try to find a different more powerfullvpower supply. I installed the addon but can’t start it. Every time the pi reboots before it’s loaded but I will keep trying and post the result hopefully later.

Share the full log here:

https://hatebin.com/

If I see any sensitive info I’ll delete the link from your post, it should be ok though.

Hi, I tried to upload it to hatebin. not sure if it worked. I’m desperate. I bought a micro SD to see if this works. and still the same issue. Cant do anything in my house anymore

I did a fresh install on a brand new micro SD card with nothing plugged in the raspberry pi. Even then it is slow, and add ons that I install wont start. Tried a different power source. I install HA btw via raspberry pi imager. Nothing seems to work

Hi! You are not alone. I have exactly the same system and the same issue.
Same thing, slowdowns, and constant reboots.
Restoring fresh backups does not help, on a brand-new installation I have the following error (up to 5 thousand times per minute):

 
Logger: aiohttp.server
Source: /usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py:421
First occurred: 6:25:38 PM (8187 occurrences)
Last logged: 6:28:04 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 350, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 557, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message:
  Invalid method encountered:

    b'\x16\x03\x01'
      ^

Only the old backup (January 2022) from my old home was stable… until the update.
The problem disappears only when I close 8080 to 8123 port forwarding on my router.

Hi. Thanks for reaching out. I also use port 8080 forwarded to 8123. I will try tomorrow morning if that helps.

Wow. It seems to work. I removed the port forwarding and it runs stable now for half an hour. I’m afraid I bought a new pi, ssd, and sky connect for nothing :joy:. At least I can build a second backup system. Would be great if there would be some kind of redundancy mode in HA

Edit:
System now running for a couple of hours without any issues. Really happy with that. Mystery remains why. I was running this setup for almost two years without issues. I can’t access the system now remotely. I changed my port in the yaml file to 8080 so I didn’t have to forward 8080 to 8123 and could access it from outside and immediately the systems crashed again. It seems the port 8080 is the root cause. Anyone with a fix?

Hi all, I have the same problem. Withoung redirecting from 8080 to 8123 its work fine. I also order new PI5 and SSD NVE disk … :slight_smile:
I also wait for the fix. It become with version 23.12.3 but after come back with incremental backup it still not works.

Please report this here:

Done. Thanks for all the help Tom.

Hi.
Just updated to the latest version that was just released and decided to try the port forwarding again. It looks like it is working for me again. So far haven’t got any log entry that I had before. Performance still oké.