Restart confirmation takes a long time to appear

When I restart HA from the developers panel, I get a dialog whether I want a reload or a full restart. I click restart and a progress indicator starts running. By the time I’d expected HA to be restarted it prompts a confirmation dialog whether I want to restart.
Nice, such a double confirmation, but why does it take so long?
See https://www.squirrel.nl/pub/hawtf-20250103.mp4 for an example.

Other HA users confirm that this is abnormally long.

I’ve tried starting HA in safe mode, but that does not make a difference. It still takes the same long time before the confirmation dialog appears. Apparently HA is waiting for something, but what?

How can I track this down?

Hello Johan Vromans,

What server hardware are you using?

My main server is a HP t520, my backup server is an RPi4. Both systems run HAOS. Both systems show the same behaviour.

Well the AMD thin client and the pi4 are both pretty low end.
More CPU intensive activities will take a bit of time.

Probably…

I’ve been using these two systems for a couple of years, and the behaviour manifested itself only a couple of releases ago. So the hardware is not my number one suspect.

The CPU load is a couple of %, and does not signifcantly increase when it is doing the hypothetical “CPU intensive activities”.

Number of addons
Size of your database
Number of Integrations, custom and otherwise
The fact that HA gets bigger and more complicated every month taxing tthe processors (Giving them more to do).

There’s nothing to

if it’s working and there are no log errors. you likely just outgrew your hardware.

As edited to my previous message, the CPU load does not indicate this.

I’m curious-- Is it just from Dev panel? Have you also tried restarting from another point in the UI, like: Settings – (top right stacked bars) – Restart Home Assistant

That’s the way I usually do it, & I haven’t noticed any change in restart times.

Or if you’re using any HACS components, & you update one. how does it act when you do the Restart HA when prompted by a Repair message?

At any rate, to me it feels very strongly like a software element is timing out while waiting for something. Have you added any new software recently?

Hi Tim – I mentioned the dev panel for completeness, but it is the same for all restart methods. There’s an on average 15 seconds delay before the confirmation button is displayed.

Even though resource monitoring does not reveal shortage of hardware capabilities I installed HA in a docker on a desktop PC and restored a backup of the original system. I get a similar delay before the restart confirmation button is displayed.
IMO, this rules out hardware capacity and add-ons.

So I fully agree that there is something in the software setup. I experience the same delay when I start HA in safe mode which already rules out many integrations.

Maybe it is just waiting for the data to sync to the database?