home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.98k stars 30.53k forks source link

Configuration validation (Check Config) takes longer than usual (some minutes) #26023

Closed Guyohms closed 5 years ago

Guyohms commented 5 years ago

Home Assistant release with the issue: 0.97.1

Last working Home Assistant release (if known): Maybe a few releases back

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io on RPI3B+

Component/platform: https://www.home-assistant.io/docs/tools/check_config/

Description of problem: Since a few days I observed that the configuration validation (from the server control page) takes a lot more time that it used to.

It takes 2-3 minutes to finish when before it took 10 seconds at most. it’s irritating when you want to test new configs…

I tried to restart/reboot a few times and nothing changed. There’s nothing in the logs at the time I do a config check.

EDIT: The restart of Home Assistant is also impacted by this and takes more time than before.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

Additional information: Some other users are experiencing this issue as seen here: https://community.home-assistant.io/t/configuration-validation-takes-longer-than-usual-some-minutes/132279

earth08 commented 5 years ago

I am facing same problem with 0.97.2 on rpi3b+.

aptonline commented 5 years ago

Same issue here with Home Assistant 0.97.2 in docker.

Guyohms commented 5 years ago

Restarting Home Assistant takes a lot longer than before too.

It might be related to the same issue because I think that the check config is called when restarting. Correct me if I'm wrong.

earth08 commented 5 years ago

@torquedelight You r correct Restart takes place after checking config So both will take same time

LordBoos commented 5 years ago

I've noticed this too. It takes minutes to restart or check configuration now. Before it was 10-20 seconds on my tinker board s.

earth08 commented 5 years ago

Have we all installed alexa_media custom addon?

narfel commented 5 years ago

I don't have alexa_media custom installed and have the same problem. For what it's worth i do have the hue_emulation component running.

Guyohms commented 5 years ago

For my part, here's what I have:

Custom components:

Integrations:

I don't think Hass.io add-ons can play a role in this so I haven't listed them.

kellerza commented 5 years ago

Can you please try the following test & report back:

Thx

narfel commented 5 years ago

I get 1:39 min and mins 1:21 min for the second time. Probably at the same time in my log this shows up (can't tell if related, my log gets flooded with messages from #24728):

(SyncWorker_2) [homeassistant.util.package] Attempting install of integrationhelper==0.2.1 (SyncWorker_5) [homeassistant.util.package] Attempting install of integrationhelper==0.2.2

kellerza commented 5 years ago

Thanks, I got a significant shorter time the second click around and wondered if it was pip/dependency related. Yours seems like it could be a pip version conflict for integrationhelper

Guyohms commented 5 years ago

I get similar results to @narfel :

And I also have this in the log that I thought unrelated at first:

(SyncWorker_9) [homeassistant.util.package] Attempting install of integrationhelper==0.2.1
(SyncWorker_7) [homeassistant.util.package] Attempting install of integrationhelper==0.2.2
(SyncWorker_14) [homeassistant.util.package] Attempting install of integrationhelper==0.2.1
(SyncWorker_6) [homeassistant.util.package] Attempting install of integrationhelper==0.2.2
narfel commented 5 years ago

Didn't expect anything to change, but just for the record installing integrationhelper with

pip3 install integrationhelper

via the terminal addon does not change anything. I have a feeling it is the same problem as #18651 was.

kellerza commented 5 years ago

@narfel luckily we don;t develop software based on feelings

For @TorqueDelight and @narfel at least the reason config_checker is slow is custom addons, I guess this is the reason for people in this thread. If you are not using custom addons and experiencing this, please feel free to open another issue.

jdesai61 commented 3 years ago

In my case, the ha-wyzesense component was the culprit. Removing it fixed config check taking 2+ minutes. However, I am still not sure why "ha core check" takes considerably longer (30+ seconds) than UI (Configuration -> Server Control -> CHECK CONFIGURATION). The UI takes less than ten seconds. Using HASSIO OS on RPI3 - and hass version (0.118.5)