mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Disable killing the server by systemd (that may lead to data loss for Buffer)
Default systemd's timeout for sending SIGKILL after SIGTERM is 1m30s (TimeoutStopSec), which is can be not enough to wait for queries or shutdown the storages. And besides in this case shutdown_wait_unfinished server settings are ignored. So let's just disable this systemd logic and rely on shutdown_wait_unfinished instead. But note shutting down the storages can take a while, but it is better to give it time instead of killing the process, since killing may lead to data loss. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
dde0a88067
commit
4c30156595
@ -17,6 +17,10 @@ User=clickhouse
|
|||||||
Group=clickhouse
|
Group=clickhouse
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
# The following ClickHouse directives should be used instead of forcing SIGKILL by systemd:
|
||||||
|
# - shutdown_wait_unfinished_queries
|
||||||
|
# - shutdown_wait_unfinished
|
||||||
|
TimeoutStopSec=infinity
|
||||||
# Since ClickHouse is systemd aware default 1m30sec may not be enough
|
# Since ClickHouse is systemd aware default 1m30sec may not be enough
|
||||||
TimeoutStartSec=0
|
TimeoutStartSec=0
|
||||||
# %p is resolved to the systemd unit name
|
# %p is resolved to the systemd unit name
|
||||||
|
Loading…
Reference in New Issue
Block a user