From a2d301ed27192919e472108541a07de65d820b92 Mon Sep 17 00:00:00 2001 From: Hendrik Bergunde Date: Mon, 8 Dec 2025 17:05:57 +0100 Subject: [PATCH] Increase timeout waiting for Core API to work around 2025.12.x issues (#6404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix too short timeouts for Synology NAS With Home Assistant Core 2025.12.x updates available the STARTUP_API_RESPONSE_TIMEOUT that HA supervisor is willing to wait (before assuming a startup failure and rolling back the entire core update) seems to be too low on not-so-beefy hosts. The problem has been seen on Synology NAS machines running Home Assistant on the side (like in my case). I have doubled the timeout from 3 to 6 minutes and the upgrade to Core 2025.12.1 works on my Synology DS723+. My update took 4min 56s -- hence the timeout increase was proven necessary. * Fix tests for increased API Timeout * Increase the timeout to 10 minutes * Increase the timeout in tests --------- Co-authored-by: Jan Čermák --- supervisor/homeassistant/core.py | 2 +- tests/homeassistant/test_core.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisor/homeassistant/core.py b/supervisor/homeassistant/core.py index f648e849f..9550e0d15 100644 --- a/supervisor/homeassistant/core.py +++ b/supervisor/homeassistant/core.py @@ -48,7 +48,7 @@ _LOGGER: logging.Logger = logging.getLogger(__name__) SECONDS_BETWEEN_API_CHECKS: Final[int] = 5 # Core Stage 1 and some wiggle room -STARTUP_API_RESPONSE_TIMEOUT: Final[timedelta] = timedelta(minutes=3) +STARTUP_API_RESPONSE_TIMEOUT: Final[timedelta] = timedelta(minutes=10) # All stages plus event start timeout and some wiggle rooom STARTUP_API_CHECK_RUNNING_TIMEOUT: Final[timedelta] = timedelta(minutes=15) # While database migration is running, the timeout will be extended diff --git a/tests/homeassistant/test_core.py b/tests/homeassistant/test_core.py index 6a7ccffe2..df8635741 100644 --- a/tests/homeassistant/test_core.py +++ b/tests/homeassistant/test_core.py @@ -387,7 +387,7 @@ async def test_api_check_timeout( ): await coresys.homeassistant.core.start() - assert coresys.homeassistant.api.get_api_state.call_count == 3 + assert coresys.homeassistant.api.get_api_state.call_count == 10 assert ( "No Home Assistant Core response, assuming a fatal startup error" in caplog.text )