Home Assistant frequently crashing and all around slow

My home assistant is crashing multiple times a day and running all around very slowly. I am running it in HAAS on a pi4 with only 1gb of ram. I am thinking the ram may be the issue and am looking to purchase this N100 but I can’t rule out an integration or automation issue. I’m a huge novice at this so anyone who can take a quick glance at my logs and shed some insight would be a huge help. Thank you in advance.

Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-09 07:05:29.701 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration vesync with title: [email protected] and entry_id: 6300930b2429393126dfd75916adabbb, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "c/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-09 07:05:29.706 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration vesync with title: [email protected] and entry_id: 6300930b2429393126dfd75916adabbb, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-09 07:05:29.712 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration vesync with title: [email protected] and entry_id: 6300930b2429393126dfd75916adabbb, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-09 07:05:29.721 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration vesync with title: [email protected] and entry_id: 6300930b2429393126dfd75916adabbb, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)
2024-08-09 07:05:29.744 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration vesync with title: [email protected] and entry_id: 6300930b2429393126dfd75916adabbb, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2122, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 151, in report
    _LOGGER.warning(msg, stack_info=True)/usr/src/homeassistant/homeassistant/config_entries.py", line 1175, in _report_non_awaited_platform_forwards
    report(
  File "/usr/sr

Welcome to Home Assistant @Fields717!

Your first stop should be to start in safe mode and see if anything improves. If it does then start looking at any integrations you have as they might be the culprit. It’s not unusual for all of us to just push down hard on the gas and go nuts, but you realize that going nuts can cause all kinds of issues sooner or later.

Details for various diagnostics and how to get into safe mode are found in the docs:

Thank you for the advice and I will try this. However, if it is a memory issue this will only tell me when I have enabled too many integrations, not that one is causing a system crash. Right?

While memory might be a factor, the core system likely isn’t using up all 1GB of your memory. It could be poorly written integrations with memory leaks that are your issue. Often times people will install, for example, a HACS integration because it’s easy when they can often do the same thing with core and using scripts or automations smartly. It can also be really poorly written automations and scripts! Where and when do you notice the problems? Do you see any patterns?

There are no patterns that I can discern. Issues started occurring about a month ago but have gotten progressively worse. I would remove integrations and it would be better for a while but would come back even worse after a couple of days. A full system reboot used to correct the problem for a couple of days but no longer seems to help.

I have booted to safe mode and disabled my HACS integrations and have rebooted. I will see if the issue stops and then re-enable them one at a time to see if I can find a culprit.
These are the HACS integrations I run:

I really appreciate your assistance and responsiveness.

I was link limited, here are the other two HACS integrations I use.

Hi Fields717,
I skimmed thru this but didn’t see if you are using an SD card or not. If you are, that is my first thought on cause. All SD cards go bad, it’s just a matter of time.

The 2nd most likely is a bad acting custom integration, and those can be sniffed out with this.
2024.5+: Tracking down instability issues caused by integrations

Thank you for your time! I was using an SD card but when issues started I suspected that could be the problem so I switched to an external SSD. I will try to see if the custom integrations are the issue. Thanks again!

Without looking in your HA setup, please double/triple check the pi has a stable power supply. Phone charger adapters generally do not suffice as pi-psu. And a pi4 is known to have trouble without a good 5.25 Volt source and perfect cables. Please do not ask how I came to this experience. After you have ruled out the hardware setup, continue with the software debugging.

1 Like

This is the power supply I am using, this should be sufficient, right?

https://www.amazon.com/gp/product/B07TYQRXTK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

I do not know the brand and its reputation, but as it is specifically states " power supply specially designed and tested for the Raspberry Pi 4" I would not suspect it to be the main source of your trouble. Also the fixed output cable prevents you from using a dodgy cable. Still if you keep experiencing hangs, swap out the SD card and stress-test the pi with a fresh install of something else to exclude the hardware setup. And then swap back the SD to continue with HA.

1Gb is really not that much.
If you read the installation guide for Raspberry Pis it mention that a Raspberry Pi 3B is “ok to get started” and that a Raspberry Pi 3A have too little RAM.
Raspberry Pi 3B have 1Gb, so you do not have much head space with your Raspberry.

You might try temporarily disabling the Blue Iris integration and seeing if things improve. In general, it takes a fair amount system horsepower to process continuous video streams. I’m not sure if that specific integration is doing the video processing or just interfacing with a Blue Iris NVR that is doing the work, but it’s definitely something to check out.

If you do need to do video processing in HAOS, you will likely want that N100 or something similar that’s more powerful than a Pi.

FWIW I don’t see your memory as an issue unless linked to a specific integration. I’ve run HAOS on an Rpi3b+ with 1gb for well over a year and I don’t recall it ever crashing. I did have an SD card failure so moved to usb and also use a 2gb swap file. Sure it’s not fast but is absolutely stable.

I want to thank everyone for their responses. I did end up getting the N100 and doing a fresh install and load from back up. The mini PC has been running crash free for about 48 hours now. System monitor shows it idling at 1.2gb of memory usage. If I had to guess it was blue iris and my 5 cameras, just too much for the pi4. Thanks again for everyone’s time and suggestions!