Server Settings

## max\_active\_parts\_loading\_thread\_pool\_size[​](#max_active_parts_loading_thread_pool_size "Direct link to max_active_parts_loading_thread_pool_size")

The number of threads to load active set of data parts (Active ones) at startup.

## max\_authentication\_methods\_per\_user[​](#max_authentication_methods_per_user "Direct link to max_authentication_methods_per_user")

The maximum number of authentication methods a user can be created with or altered to.
Changing this setting does not affect existing users. Create/alter authentication-related queries will fail if they exceed the limit specified in this setting.
Non authentication create/alter queries will succeed.

Note

A value of `0` means unlimited.

## max\_backup\_bandwidth\_for\_server[​](#max_backup_bandwidth_for_server "Direct link to max_backup_bandwidth_for_server")

The maximum read speed in bytes per second for all backups on server. Zero means unlimited.

## max\_backups\_io\_thread\_pool\_free\_size[​](#max_backups_io_thread_pool_free_size "Direct link to max_backups_io_thread_pool_free_size")

If the number of **idle** threads in the Backups IO Thread pool exceeds `max_backup_io_thread_pool_free_size`, ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary.

## max\_backups\_io\_thread\_pool\_size[​](#max_backups_io_thread_pool_size "Direct link to max_backups_io_thread_pool_size")

ClickHouse uses threads from the Backups IO Thread pool to do S3 backup IO operations. `max_backups_io_thread_pool_size` limits the maximum number of threads in the pool.

## max\_build\_vector\_similarity\_index\_thread\_pool\_size[​](#max_build_vector_similarity_index_thread_pool_size "Direct link to max_build_vector_similarity_index_thread_pool_size")

The maximum number of threads to use for building vector indexes.

Note

A value of `0` means all cores.

## max\_concurrent\_insert\_queries[​](#max_concurrent_insert_queries "Direct link to max_concurrent_insert_queries")

Limit on total number of concurrent insert queries.

Note

A value of `0` (default) means unlimited.

This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged.

## max\_concurrent\_queries[​](#max_concurrent_queries "Direct link to max_concurrent_queries")

Limit on total number of concurrently executed queries. Note that limits on `INSERT` and `SELECT` queries, and on the maximum number of queries for users must also be considered.

See also:

- [`max_concurrent_insert_queries`](/docs/operations/server-configuration-parameters/settings#max_concurrent_insert_queries)
- [`max_concurrent_select_queries`](/docs/operations/server-configuration-parameters/settings#max_concurrent_select_queries)
- [`max_concurrent_queries_for_all_users`](/docs/operations/settings/settings#max_concurrent_queries_for_all_users)

Note

A value of `0` (default) means unlimited.

This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged.

## max\_concurrent\_select\_queries[​](#max_concurrent_select_queries "Direct link to max_concurrent_select_queries")

Limit on total number of concurrently select queries.

Note

A value of `0` (default) means unlimited.

This setting can be modified at runtime and will take effect immediately. Queries that are already running will remain unchanged.

## max\_connections[​](#max_connections "Direct link to max_connections")

Max server connections.

## max\_database\_num\_to\_throw[​](#max_database_num_to_throw "Direct link to max_database_num_to_throw")

If number of databases is greater than this value, server will throw an exception. 0 means no limitation.

## max\_database\_num\_to\_warn[​](#max_database_num_to_warn "Direct link to max_database_num_to_warn")

If the number of attached databases exceeds the specified value, clickhouse server will add warning messages to `system.warnings` table.

**Example**

```
<max_database_num_to_warn>50</max_database_num_to_warn>
```

## max\_database\_replicated\_create\_table\_thread\_pool\_size[​](#max_database_replicated_create_table_thread_pool_size "Direct link to max_database_replicated_create_table_thread_pool_size")

The number of threads to create tables during replica recovery in DatabaseReplicated. Zero means number of threads equal number of cores.

## max\_dictionary\_num\_to\_throw[​](#max_dictionary_num_to_throw "Direct link to max_dictionary_num_to_throw")

If the number of dictionaries is greater than this value, the server will throw an exception.

Only counts tables for database engines:

- Atomic
- Ordinary
- Replicated
- Lazy

Note

A value of `0` means no limitation.

**Example**

```
<max_dictionary_num_to_throw>400</max_dictionary_num_to_throw>
```

## max\_dictionary\_num\_to\_warn[​](#max_dictionary_num_to_warn "Direct link to max_dictionary_num_to_warn")

If the number of attached dictionaries exceeds the specified value, clickhouse server will add warning messages to `system.warnings` table.

**Example**

```
<max_dictionary_num_to_warn>400</max_dictionary_num_to_warn>
```

## max\_distributed\_cache\_read\_bandwidth\_for\_server[​](#max_distributed_cache_read_bandwidth_for_server "Direct link to max_distributed_cache_read_bandwidth_for_server")

The maximum total read speed from distributed cache on server in bytes per second. Zero means unlimited.

## max\_distributed\_cache\_write\_bandwidth\_for\_server[​](#max_distributed_cache_write_bandwidth_for_server "Direct link to max_distributed_cache_write_bandwidth_for_server")

The maximum total write speed to distributed cache on server in bytes per second. Zero means unlimited.

## max\_entries\_for\_hash\_table\_stats[​](#max_entries_for_hash_table_stats "Direct link to max_entries_for_hash_table_stats")

How many entries hash table statistics collected during aggregation is allowed to have

## max\_fetch\_partition\_thread\_pool\_size[​](#max_fetch_partition_thread_pool_size "Direct link to max_fetch_partition_thread_pool_size")

The number of threads for ALTER TABLE FETCH PARTITION.

## max\_format\_parsing\_thread\_pool\_free\_size[​](#max_format_parsing_thread_pool_free_size "Direct link to max_format_parsing_thread_pool_free_size")

Maximum number of idle standby threads to keep in the thread pool for parsing input.

## max\_format\_parsing\_thread\_pool\_size[​](#max_format_parsing_thread_pool_size "Direct link to max_format_parsing_thread_pool_size")

Maximum total number of threads to use for parsing input.

## max\_held\_snapshots[​](#max_held_snapshots "Direct link to max_held_snapshots")

Maximum number of lightweight snapshots that can be held at the same time. Zero means unlimited. If the number of snapshots reaches this limit, an exception is thrown when trying to create a new snapshot.

## max\_io\_thread\_pool\_free\_size[​](#max_io_thread_pool_free_size "Direct link to max_io_thread_pool_free_size")

If the number of **idle** threads in the IO Thread pool exceeds `max_io_thread_pool_free_size`, ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary.

## max\_io\_thread\_pool\_size[​](#max_io_thread_pool_size "Direct link to max_io_thread_pool_size")

ClickHouse uses threads from the IO Thread pool to do some IO operations (e.g. to interact with S3). `max_io_thread_pool_size` limits the maximum number of threads in the pool.

## max\_keep\_alive\_requests[​](#max_keep_alive_requests "Direct link to max_keep_alive_requests")

Maximal number of requests through a single keep-alive connection until it will be closed by ClickHouse server.

**Example**

```
<max_keep_alive_requests>10</max_keep_alive_requests>
```

## max\_local\_read\_bandwidth\_for\_server[​](#max_local_read_bandwidth_for_server "Direct link to max_local_read_bandwidth_for_server")

The maximum speed of local reads in bytes per second.

Note

A value of `0` means unlimited.

## max\_local\_write\_bandwidth\_for\_server[​](#max_local_write_bandwidth_for_server "Direct link to max_local_write_bandwidth_for_server")