More than 20 minutes to restart Home Assistant, normal?

Until now I used Jeedom but I am currently testing Home Assistant. I did several tests, first with the OVA supplied from Hassio, I also tried Docker on Synology. Finally, I chose to use a Debian 10 VM. The VM is hosted on a Synology (2 processors, 2 GB of RAM).
I opted for Debian because I use USB Redirector to retrieve Bluetooth and Zigbee USB keys that are plugged into a raspberry Pi in the center of the house.

In any case, whatever the way of installing home assistant (ova, docker, or debian on vm), I find that the start / restart time to take into account the changes to the config is very long (minimum 20 minutes, sometimes more). Is this normal? The allocated resources seem sufficient to me, but is this the case?
Thanks for your help !

Not normal, mine needs less then 20sec to restart. Could it be you have no volume mounted for config storage and start from scratch on every restart?

I don’t know if I have a volume mounted or not …
What exactly should I do in my case, Debian VM with docker containers …?
Thank you

Then I guess you haven’t and you are resetting you HA installation with every restart.

Please follow the guidelines to set-up HA in any flavor you like.

Sorry but I don’t quite understand …
HA does not reset on every start. The config files and the modifications are taken into account.
I left the files in the default directory: / config.
It’s not good ?

About 5-10seconds to restart for me

With docker containers ?

Yes, HA Container, no VM, no Hass OS, no Supervisor.

Supervised install on Debian 10, so yes docker containers.

where is your config stored? in a mounted volume?

Host directory bind-mounted to /config.

So on my Synology, I create a shared directory that I mount on the Debian VM and that I indicate in the path PATH_TO_YOUR_CONFIG?

docker run -d --name = "home-assistant" -v /mnt/syno/config: / config -v / etc / localtime: / etc / localtime: ro --net = host homeassistant / home-assistant: stable

Assuming the spaces are unintentional, that’s the way to run Home Assistant Container and you should find a file configuration.yaml in that shared directory.

indeed, spaces are not intentional.
I used this doc for installation and it’s not written anywhere, wonder …?

I have no experience with HA OS or Supervised installation, I run HA Container on Ubuntu and Rasbian. Just works and definitely does not take 20 mins to restart.

My experience with long start times was because of the size of the recorder database. If you can tail the HA log, you will see messages about recorder taking a long time.

I have moved my recorder database to an external PostgreSQL database which solved the problem.

External database server makes a huge difference. As does running of an SSD rather than an SD card

My Pi4 setup is on an SSD - still very slow starting up with the internal database.

Some of the database files get rather large.

1 Like

I think I have identified the problem. In my opinion, this was from an RFXCom 433 integration whose device had been physically disconnected from the server. HA was looking for this device and after a timeout, I got the hand back.
Now restarting takes 1 to 2 minutes.
What database do you use?