0.38.1 database not ready

I just restarted my HA install and there is constant stream of :

17-02-12 18:27:03 WARNING (Thread-12) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.
17-02-12 18:27:13 WARNING (Thread-12) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.
17-02-12 18:27:23 WARNING (Thread-12) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.
17-02-12 18:27:33 WARNING (Thread-12) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.
17-02-12 18:27:43 WARNING (Thread-12) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.
17-02-12 18:27:53 WARNING (Thread-12) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.

Scrolling by. Nothing is happing as long as that is going.

got same here.
Any idea of cause?

I’m the same but not with SQLLite; only with MySQL set as the recorder. I was having issues with MySQL recorder prior to the 0.38 upgrade and thought I would give it another try after the update. Now the error is much more concise and related to the db vs the garbled aiohttp log entries that I was getting before.

Still not sure what is wrong with MySQL but I don’t want to derail this thread. I can setup local and remote MySQL schemas on multiple PCs and connect with the “hass” user from client tools but no joy from Home Assistant.

I’m sorry, I should have been clearer. This is with MSSQL. Guess that was an important piece of information to leave out. Sorry.

This morning I came in and restarted and the messages have stopped and everything is up. Sounds like there is something that didn’t clear a lock or something and it took a while to kill the connection. Something not shutting down cleanly.

I fixed mine by
pip3 install mysqlclient
in the virtual side.

2 Likes

i can’t find the face palm emoji but I sure am feeling it.
Ha, Thanks!

Hindsight is so clear.

Well I just upgrade to 0.38.2 and the database not ready thing is back.

17-02-13 21:07:17 WARNING (Thread-4) [homeassistant.components.recorder] Database not ready, waiting another 10 seconds.

What disturbs me is that the system goes ahead and tries to start up with it still happening. What is this actually telling us and what is the impact of the system running with this message repeatedly showing up every 10 seconds.

rlfierro’s solution is the key: recorder component should have trigger an install of “mysqlclient” in HomeAssistant, when an external SQL server solution is detected.

So current solution for the problem is the:

pip3 install mysqlclient

from command-line

the other part of the key is it has to be targeted to the .homeassistant/deps directory. Got it working the other day.
Thanks

There should be an ImportError exception somewhere near the beginning of the log if mysqlclient was not found.

A proposed fix in https://github.com/home-assistant/home-assistant/pull/6192 (but this will probably only make 0.40)