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

# max_distributed_* session settings

> ClickHouse session settings in the max_distributed_* 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).

## max\_distributed\_connections

Type

NonZeroUInt64

Default

1024

The maximum number of simultaneous connections with remote servers for distributed processing of a single query to a single Distributed table. We recommend setting a value no less than the number of servers in the cluster.

The following parameters are only used when creating Distributed tables (and when launching a server), so there is no reason to change them at runtime.

## max\_distributed\_depth

Type

UInt64

Default

5

Limits the maximum depth of recursive queries for [Distributed](https://clickhouse.com/docs/reference/engines/table-engines/special/distributed.md) tables.

If the value is exceeded, the server throws an exception.

Possible values:

* Positive integer.
* 0 — Unlimited depth.
