System rebooting with no clear cause

I am having major issues with my Home Assistant rebooting. Right now the system is up for less than 10 minutes before it reboots again.

I am trying to look at the logs to see if there is something in there that is causing it but nothing seems to jump out.

I am unable to upgrade or even crreate a new full backup as the system is rebooting before these can complete.

I did think about restoring from a backup but when I look in the backups they are all showing as “partial backups” and I am not sure if I am able to retore from a partial backup.

I did try to eliminate hardware issues by putting my installation onto a new raspberry pi but I am still seeing the same behaviour on the other raspberry pit too.

Help please…this is driving me nuts!

What is the hardware setup?

What type of Pi? Powered by what? What USB devices are connected?

1 Like

Raspberry Pi 4 powered with 5V 3000Ma power supply
Home Assistant 2023.10.3
Supervisor 2023.11.6
Operating System 11.1
Frontend 20231005.0 - latest

Connected via USB:
Hard drive - OS Running from Samsung T5 SSD (250Gb)
Sonoff Zigbee 3.0 dongle

Have you also looked in home-assistant.log.1 and home-assistant.log.fault?

Any active cooling too?

Raspis have quite a high power draw compared with the recommended power supplies. That are not much juice left to power additional things and once you get near the limit, then the Raspis will start to reboot.
It is always suggested to connect a power USB hub and move all USB sticks over to that, so the Raspi only really run the SSD and maybe an active cooling. Sometimes the SSD can be required to move to that USB hub too.

I am not sure how to access home-assistant.log.1 and home-assistant.log.fault but when I go into System/Logs there are 2 entries that “look suspicious”:

Ended unfinished session (id=5889 from 2023-12-02 10:07:58.402829)
10:17:38 AM – (WARNING) Recorder
The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
10:17:38 AM – (WARNING) Recorder

All other entries seem to be related to devices which are taking to long to connect or devices that are still in my setup but not connected right now

I did try a more powerful power supply too but that was not sucessful either

I have a cooling fan on the Raspberry pi too and it does not seem to be getting too hot so I figured it wasnt caused by that either.

A more powerful power supply will do nothing if the internal circuit are not designed to handle it and I do not believe the Raspis circuits are.
The fan might be keeping the Raspi cool, but it also draw power and it is the power that is the limited resource here.

It has been working fine for about 3 years now and I recently switched it over to a new Raspberry Pi to check that it wasnt the old hardware which was giving the problem, so still at a loss.

Try deleting the database

ok I could delete…but how could I recover my data? Is that database not the one where all of my sensor data is stored?

A powered USB hub will probably solve this problem.

Yeah, sorry, that was only a suggestion and your sensors history would be destroyed, always backup your data.

Take a look at Tinkerers adviced, he is a really experienced user.

More that I see this almost every week on Discord, where somebody has pushed past the limit of what the Pi’s USB ports can provide.

Almost always it happens with a USB connected SSD and a Zigbee/Z-Wave stick. Sometimes it can happen with just an SSD.

Even using the official power supply doesn’t help, as it’s just a feature of how much power the Pi can draw, vs how much it can supply to the USB ports. The problem appears more common with HAOS, though that may just be a reporting problem (that is, more HAOS users report it than non-HAOS users).

2 Likes

So I have been able to resolve the rebooting issue…I systematically stopped each of my add ons and scaled back to only the bare bones running and that seemed to fix it. I then started adding them back and it seems that node red was the offending add-on.

My problem is that now I have somehow managed to reinstall node red and lost all of my old flows.

I tried to restore an old version of node red from my backups which seems to perfom the restore…but when I try to start the add on it wont actually start.

Am I able to somehow extract the old flws from the node red backup file manually?