Increase timeout to avoid killing the core during shutdown (#45029)

Stopping the core goes through several stages, which can take up to
120s, 60s and 30s respectively. However, if shutdown is taking longer
than 60s overall, s6 isn't patient and kills the core:
Jan 10 23:56:58 homeassistant eb034fca9c7d[407]: s6-svwait: fatal: timed out
Jan 10 23:56:58 homeassistant eb034fca9c7d[407]: [s6-finish] sending all processes the TERM signal.
Jan 10 23:57:01 homeassistant eb034fca9c7d[407]: [s6-finish] sending all processes the KILL signal and exiting.

This is most of the time not a problem since shutdown is quicker than
that.

However, increasing the timeout is especialy useful to debug cases when
an event is hanging, since the core will point it out after its timeout
elapsed.

Set the timeout to 220s, which is all core timeouts plus 10s grace time.
This commit is contained in:
Stefan Agner 2021-01-11 11:24:02 +01:00 committed by GitHub
parent ab25c5a2bd
commit 54064b4010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,8 +1,9 @@
ARG BUILD_FROM
FROM ${BUILD_FROM}
# Synchronize with homeassistant/core.py:async_stop
ENV \
S6_SERVICES_GRACETIME=60000
S6_SERVICES_GRACETIME=220000
WORKDIR /usr/src