> ## 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_* 会话设置

> ClickHouse 在 max_distributed_* 自动生成分组中的会话设置。

这些设置可在 [system.settings](https://clickhouse.com/docs/zh/reference/system-tables/settings.md) 中查看，并由 [源文件](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp) 自动生成。

## max\_distributed\_connections

类型

UInt64

默认值

1024

单个查询针对单个 Distributed 表进行分布式处理时，与远程服务器建立的最大并发连接数。建议将该值设置为不小于集群中的服务器数量。

以下参数仅在创建分布式表时 (以及在启动服务器时) 使用，因此没有必要在运行时更改它们。

## max\_distributed\_depth

类型

UInt64

默认值

5

限制 [Distributed](https://clickhouse.com/docs/zh/reference/engines/table-engines/special/distributed.md) 表递归查询的最大深度。

如果超过该值，服务器会抛出异常。

可能的值：

* 正整数。
* 0 — 深度不受限制。
