HA takes forever to restart after upgrading to 0.30.2

Hi guys,

I updated my HA to the latest version (0.30.2) and now every time I fire restart command it takes like 10 minutes or more. I am running my HA on Arduino connected to a PC with a serial gateway.

Also, even when I stop HA by using “Ctlr+C” in cmd, it takes forever to stop. It used to be super quick on HA V 0.27.0.

Any suggestion on how I can fix this ?

Hmm. I experienced the opposite when moving from .28

Do you by chance have a large home-assistant_v2.db ?

@ih8gates Thanks for your reply.

Now that I looked at my “home-assistant_v2.db”, it is actually a very large file, around 1.6 GB ! Is this normal ?

Mine sits around .5G

I think you keep it smaller by using the purge_days option.

You might try renaming it and restarting - see if that affects things. It could at least rule out one cause.

Well I am not sure what is purge_days option !

Would renaming “home-assistant_v2.db” not cause a problem ? Well, maybe not finding the existing file forces the HA to create a new one … I will do it now.

purge_days is a setting for history.

history:
  purge_days: 3

HA will create a new db if you rename the old one.

@ih8gates apologies for late reply. I tried your suggestion, but it really hasn’t changed anything.

I also noticed some other issues with my HA. The logbook doesn’t work properly anymore. It takes almost half an hour to load data of a previous day…

And when I am trying to restart the HA, it takes like hours… this is the screen I see in my cmd:

Hmmm. What happens if you turn off (#commentout) discovery in your config.yaml?

Does HASS start quickly then?

It looks like “purge days” isn’t actually a configuration for history. It works for the logger, but when I updated to .31, it told me that that config was wrong.

Ok, now that I disabled the discovery, it is a little bit better. But still takes far too long ( 2, 3 minutes) compare to before.

It looks like it runs into error before restarting;

Sorry - not sure how to help you there. I’m running on a Pi3.

Well, thanks for your help anyway.