> ## 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.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

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

<h2 id="insert_keeper_fault_injection_probability">
  insert\_keeper\_fault\_injection\_probability
</h2>

<SettingsInfoBlock type="Float" default_value="0" />

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

<h2 id="insert_keeper_fault_injection_seed">
  insert\_keeper\_fault\_injection\_seed
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

0 - random seed, otherwise the setting value

<h2 id="insert_keeper_max_retries">
  insert\_keeper\_max\_retries
</h2>

<SettingsInfoBlock type="UInt64" default_value="20" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.2"},{"label": "20"},{"label": "Enable reconnections to Keeper on INSERT, improve reliability"}]}]} />

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.

<h2 id="insert_keeper_retry_initial_backoff_ms">
  insert\_keeper\_retry\_initial\_backoff\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="100" />

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

Possible values:

* Positive integer.
* 0 — No timeout

<h2 id="insert_keeper_retry_max_backoff_ms">
  insert\_keeper\_retry\_max\_backoff\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="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
