mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
19d0c929d6
After ClickHouse became systemd aware (#43400), it waits not more then TimeoutStartSec (1m30sec by default), while before it simply ensures that the process is there. And likely 1m30sec can be not enough for some cluster, and this will lead to endless restarts. At first I've increased it to 10min, but there was a comment about that this is not enough, and I agree with this. But I'm not sure that using "inifinity" is a good option, but I cannot think of any downsides of this. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
34 lines
1.3 KiB
Desktop File
34 lines
1.3 KiB
Desktop File
[Unit]
|
|
Description=ClickHouse Server (analytic DBMS for big data)
|
|
Requires=network-online.target
|
|
# NOTE: that After/Wants=time-sync.target is not enough, you need to ensure
|
|
# that the time was adjusted already, if you use systemd-timesyncd you are
|
|
# safe, but if you use ntp or some other daemon, you should configure it
|
|
# additionaly.
|
|
After=time-sync.target network-online.target
|
|
Wants=time-sync.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
|
|
# NOTE: we leave clickhouse watchdog process enabled to be able to see OOM/SIGKILL traces in clickhouse-server.log files.
|
|
# If you wish to disable the watchdog and rely on systemd logs just add "Environment=CLICKHOUSE_WATCHDOG_ENABLE=0" line.
|
|
User=clickhouse
|
|
Group=clickhouse
|
|
Restart=always
|
|
RestartSec=30
|
|
# Since ClickHouse is systemd aware default 1m30sec may not be enough
|
|
TimeoutStartSec=inifinity
|
|
# %p is resolved to the systemd unit name
|
|
RuntimeDirectory=%p
|
|
ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=%t/%p/%p.pid
|
|
# Minus means that this file is optional.
|
|
EnvironmentFile=-/etc/default/%p
|
|
LimitCORE=infinity
|
|
LimitNOFILE=500000
|
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE
|
|
|
|
[Install]
|
|
# ClickHouse should not start from the rescue shell (rescue.target).
|
|
WantedBy=multi-user.target
|