Slow reboot

Hi

After update too latest version my HA is really slow to startup.

What i get in the log is

[homeassistant.setup] Setup of media_player is taking over 10 seconds.
17-04-22 19:11:28 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
17-04-22 19:11:33 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.

After reboot everything works (except that sometime it looses all the Vera units, then i need too reboot again)

What should i look at too get this fixed?

A simple restart of hass gives me:

Apr 22 20:28:10 red systemd[1]: home-assistant.service stop-sigterm timed out. Killing.
Apr 22 20:28:11 red systemd[1]: home-assistant.service: main process exited, code=killed, status=9/KILL
Apr 22 20:28:11 red systemd[1]: Unit home-assistant.service entered failed state.
Apr 22 20:28:11 red systemd[1]: Starting Home Assistant...

Followed by:

Apr 22 20:28:34 red hass[32023]: 17-04-22 20:28:34 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
Apr 22 20:28:39 red hass[32023]: 17-04-22 20:28:39 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.

And then hass starts, and works…

Same for me, but it takes about 5-10 mins.
Maybe its my Raspberry PI thats the problem, im gonna check that out

Are you talking about a full reboot of the rasberry, or the home-assistant service?

If it’s the service, perhaps checking the logs in realtime while restarting it will give some insight on the source of the problem.

I use sudo journalctl -f -u homeassistant in a terminal to see the log output in realtime.

If you want to hilight some keywords you can use it with egrep:
sudo journalctl -f -u homeassistant | egrep --color=always 'WARNING|ERROR|exited|$'

Just make sure to keep the |$ in your pattern so you match something on every line.

This issue seems relevant: https://github.com/home-assistant/home-assistant/issues/7223

@ chrio
I have Hassio cannot use sudo journalctl -f -u homeassistant

There is a way to do it in Hassio?
I tried to turn off and restart Rpi3… but with the same result
it spent about 4 minutes to restart…
it seem not all automations are started… becouse some automations works and some other do not works.

My home assistant UI takes at least 5 minutes to boot.
If I ssh to host while booting and I run ps faux I see a lot of very slow pip install processes. The UI shows up when dependencies install finishes…
How can I avoid re-installing all dependencies at every reboot? I’m using HassOS at version 0.97!
Thanks

My UI was doing this the other day so I disabled Google Calendar and it restarts in under a minute again

1 Like

@Ligio did You found anything? I have the exact same problem. I have almost fresh install and when I powerup my Pi or restart it I must wait at least 4 minutes to get the UI

Hi @Misiu!
Finally, I’ve found the problem. I was using a custom_component that had an old version of pycrypto as a requirement.
When hass was restarting, it tried to compile the library and install it and at the end the install process failed. So, at every restart/reboot, the install process started again.
Try to ssh and login to your hass docker container as described here:
https://developers.home-assistant.io/docs/en/hassio_debugging.html#hassos-based-hassio
Then, run docker exec -ti <hass-docker-container> bash and top and see what’s happening!
Happy debug! :wink:

My RPi takes less than 1 minute to restart HA, it may be a software issie

I’m facing this issue as well. It takes 3 minutes to check config and over 5 mins to reboot HA. I’m running the latest HassOS 3.8 in VirtualBox and I belive its been happening ever since I switched from docker on a Ubuntu PC to a VM inside of windows. There’s 1.3GB of free memory and utilizing 2 of 4 cores. The logs show a few errors of some components taking longer than 10 seconds to start but everything seems to work just fine once finally booted up. It’s very frustrating because I’m constantly updating my config to try out new things. I hope someone can help me.

same here … at least 10 mins to reboot with rpi4 … almost clean install (but installed official addons).
I’m not very impressed from HA so far^^

I am hoping someone can help me… I was running hassio in virtual box and recently switched to vmware workstation. I built a new image from scratch and then loaded my config files. Everything has seemed to go ok. With one difference. When I reboot my system and have to restart the vm, I watch hassio io go thru it typical boot sequence. When it is done. I get the following in the vm window:
Welcome to Home Assistant
homeassistant login:

I can login using root, and it logs me in to the ha cli…Initially lovelace will not load. not sure what is going on, can someone explain?

Sam