Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/en/administrator-guide/config/fe_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ This variable is a dynamic configuration, and users can modify the configuration

### `http_backlog_num`

The backlog_num for netty http server, When you enlarge this backlog_num,
you should enlarge the value in the linux /proc/sys/net/core/somaxconn file at the same time

### `mysql_nio_backlog_num`

The backlog_num for mysql nio server, When you enlarge this backlog_num,
you should enlarge the value in the linux /proc/sys/net/core/somaxconn file at the same time

### `http_port`

HTTP bind port. Defaults to 8030.
Expand Down
6 changes: 6 additions & 0 deletions docs/zh-CN/administrator-guide/config/fe_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ FE 的配置项有两种方式进行配置:
### `history_job_keep_max_second`

### `http_backlog_num`
Doris netty http server 的backlog_num 参数,当你增大该配置时,也需要同时
增大 Linux /proc/sys/net/core/somaxconn 文件的值

### `mysql_nio_backlog_num`
Doris mysql nio server 的backlog_num 参数,当你增大该配置时,也需要同时
增大 Linux /proc/sys/net/core/somaxconn 文件的值

### `http_port`

Expand Down
11 changes: 9 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/common/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,18 @@ public class Config extends ConfigBase {

/**
* The backlog_num for netty http server
* When you enlarge this backlog_num, you should ensure it's value larger than
* the linux /proc/sys/net/core/somaxconn config
* When you enlarge this backlog_num, you should enlarge the value in
* the linux /proc/sys/net/core/somaxconn file at the same time
*/
@ConfField public static int http_backlog_num = 1024;

/**
* The backlog_num for mysql nio server
* When you enlarge this backlog_num, you should enlarge the value in
* the linux /proc/sys/net/core/somaxconn file at the same time
*/
@ConfField public static int mysql_nio_backlog_num = 1024;

/**
* The connection timeout and socket timeout config for thrift server
* The value for thrift_client_timeout_ms is set to be larger than zero to prevent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public NMysqlServer(int port, ConnectScheduler connectScheduler) {
public boolean start() {
try {
server = xnioWorker.createStreamConnectionServer(new InetSocketAddress(port),
acceptListener, OptionMap.create(Options.TCP_NODELAY, true));
acceptListener, OptionMap.create(Options.TCP_NODELAY, true, Options.BACKLOG, Config.mysql_nio_backlog_num));
server.resumeAccepts();
running = true;
LOG.info("Open mysql server success on {}", port);
Expand Down