From 74f5b924205cde25c20d0b391bb2ead4a851afe7 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 6 Oct 2021 21:09:00 +0300 Subject: [PATCH] Add listen_backlog to documentation Follow-up for: #29643 --- .../settings.md | 26 +++++++++++++++++++ programs/server/config.xml | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 552854f7cff..b99625af91a 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -475,6 +475,32 @@ Examples: 127.0.0.1 ``` +## listen_backlog {#server_configuration_parameters-listen_backlog} + +Backlog (queue size of pending connections) of the listen socket. + +Default value: `4096` (as in linux [5.4+](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19f92a030ca6d772ab44b22ee6a01378a8cb32d4)). + +Usually you don't need to change this, since: +- default value is large enough, +- and for accepting client's connections server has separate thread. + +So even if you have `TcpExtListenOverflows` (from `nstat`) non zero (and you +100% sure that this counter grows for ClickHouse server) it does not mean that +you need to increase this value, since: +- usually if 4096 is not enough it shows some internal ClickHouse scaling + issue, so it is better to report an issue. +- and it does not mean that the server can handle more connections later (and + even if it can, clients can already goes away / disconnect). + +However if you 100% sure, go ahead. + +Examples: + +``` xml +4096 +``` + ## logger {#server_configuration_parameters-logger} Logging settings. diff --git a/programs/server/config.xml b/programs/server/config.xml index f9a3a5030d9..ba4c680d765 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -172,7 +172,7 @@ --> - + 4096