Home Assistant taking too long to reboot

I’m running Home Assistant Supervised on Debian on Docker.
I’m using Intel NUC

Normally the rebooting process was taking about 10-20s, but now takes about 10min.

I’ve tried to purge the DB and see if that was the problem but without success.

Here are some Supervisor logs:

21-04-21 15:01:34 INFO (SyncWorker_4) [supervisor.docker.interface] Restarting homeassistant/qemux86-64-homeassistant
21-04-21 15:01:34 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Received message 8:1000 is not str
21-04-21 15:01:34 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
21-04-21 15:01:34 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Received message 8:1000 is not str
21-04-21 15:01:34 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-04-21 15:02:41 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
21-04-21 15:05:14 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
21-04-21 15:05:16 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-04-21 15:05:16 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-04-21 15:10:30 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
21-04-21 15:10:31 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize

I also got this error from the second reboot:

2021-04-21 17:14:15 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /homeassistant/restart request

What should I try next?

Have you tried a cold reboot of the NUC?

Make a snapshot then restore an older snapshot from before the slow reboot presented. Does the problem persist? If yes, it probably isn’t Home Assistant, but maybe something on the NUC.

Hi,

which version are you running? 2021.4.5?

In this release they accidentally introduced a dead lock on automations with mode restart. Under specific circumstances this will lead in broken restart automations which will run forever and will cause the error you see in the log on reboot.

If this is the case update to latest version. It is already fixed

It’s the newest version: 2021.4.6.

I just found that when I restart it from Docker it takes about 20s,
but restart from HA takes about 10min.

After the Docker restart, the restart from HA also takes about 20s.
But after day or two it’s back to 10min. Hmm…