> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# insert_keeper_* session settings

> ClickHouse session settings in the insert_keeper_* generated group.

These settings are available in [system.settings](https://clickhouse.com/docs/reference/system-tables/settings.md) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

## insert\_keeper\_fault\_injection\_probability

Type

Float

Default

0

Approximate probability of failure for a keeper request during insert. Valid value is in interval \[0.0f, 1.0f]

## insert\_keeper\_fault\_injection\_seed

Type

UInt64

Default

0

0 - random seed, otherwise the setting value

## insert\_keeper\_max\_retries

Type

UInt64

Default

20

The setting sets the maximum number of retries for ClickHouse Keeper (or ZooKeeper) requests during insert into replicated MergeTree. Only Keeper requests which failed due to network error, Keeper session timeout, or request timeout are considered for retries.

Possible values:

* Positive integer.
* 0 — Retries are disabled

Keeper request retries are done after some timeout. The timeout is controlled by the following settings: `insert_keeper_retry_initial_backoff_ms`, `insert_keeper_retry_max_backoff_ms`.
The first retry is done after `insert_keeper_retry_initial_backoff_ms` timeout. The consequent timeouts will be calculated as follows:

```
timeout = min(insert_keeper_retry_max_backoff_ms, latest_timeout * 2)
```

For example, if `insert_keeper_retry_initial_backoff_ms=100`, `insert_keeper_retry_max_backoff_ms=10000` and `insert_keeper_max_retries=8` then timeouts will be `100, 200, 400, 800, 1600, 3200, 6400, 10000`.

Apart from fault tolerance, the retries aim to provide a better user experience - they allow to avoid returning an error during INSERT execution if Keeper is restarted, for example, due to an upgrade.

## insert\_keeper\_retry\_initial\_backoff\_ms

Type

UInt64

Default

100

Initial timeout(in milliseconds) to retry a failed Keeper request during INSERT query execution

Possible values:

* Positive integer.
* 0 — No timeout

## insert\_keeper\_retry\_max\_backoff\_ms

Type

UInt64

Default

10000

Maximum timeout (in milliseconds) to retry a failed Keeper request during INSERT query execution

Possible values:

* Positive integer.
* 0 — Maximum timeout is not limited
