From 1f57968c9b7db8b6f56fd6646a2e598c89105760 Mon Sep 17 00:00:00 2001 From: Zaiming Shi Date: Thu, 10 Jun 2021 19:59:10 +0200 Subject: [PATCH] chore(conf): change default number of gen_rpc connections to 1 --- etc/emqx.conf | 4 ++-- priv/emqx.schema | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/emqx.conf b/etc/emqx.conf index 8d3a9c74e..6a92f37ec 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -343,8 +343,8 @@ rpc.port_discovery = stateless ## Number of outgoing RPC connections. ## ## Value: Interger [0-256] -## Defaults to NumberOfCPUSchedulers / 2 when set to 0 -#rpc.tcp_client_num = 0 +## Default = 1 +#rpc.tcp_client_num = 1 ## RCP Client connect timeout. ## diff --git a/priv/emqx.schema b/priv/emqx.schema index 7c6bf0298..ddd82c630 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -376,7 +376,7 @@ end}. {translation, "gen_rpc.tcp_client_num", fun(Conf) -> case cuttlefish:conf_get("rpc.tcp_client_num", Conf) of - 0 -> max(1, erlang:system_info(schedulers) div 2); + 0 -> 1; %% keep allowing 0 for backward compatibility V -> V end end}.