From 79685da90b514a49f9c412e31dccc17be9dd8680 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 3 Oct 2017 01:29:52 +0200 Subject: [PATCH 1/2] Increase 'max_fsm_queue' default The old default was becoming too small for some workloads. --- ejabberd.yml.example | 2 +- src/ejabberd_redis.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ejabberd.yml.example b/ejabberd.yml.example index 99892823b..acd9a0c94 100644 --- a/ejabberd.yml.example +++ b/ejabberd.yml.example @@ -444,7 +444,7 @@ shaper: ## This option specifies the maximum number of elements in the queue ## of the FSM. Refer to the documentation for details. ## -max_fsm_queue: 1000 +max_fsm_queue: 10000 ###. ==================== ###' ACCESS CONTROL LISTS diff --git a/src/ejabberd_redis.erl b/src/ejabberd_redis.erl index 56948ec83..76ae10ace 100644 --- a/src/ejabberd_redis.erl +++ b/src/ejabberd_redis.erl @@ -45,7 +45,7 @@ -define(SERVER, ?MODULE). -define(PROCNAME, 'ejabberd_redis_client'). -define(TR_STACK, redis_transaction_stack). --define(DEFAULT_MAX_QUEUE, 5000). +-define(DEFAULT_MAX_QUEUE, 10000). -define(MAX_RETRIES, 1). -define(CALL_TIMEOUT, 60*1000). %% 60 seconds From 532aba993bf270604c2715773c3f668b5846c254 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 3 Oct 2017 01:37:10 +0200 Subject: [PATCH 2/2] mod_stream_mgmt: Increase 'max_ack_queue' default Users with large rosters and/or certain transports might receive a very large number of (e.g.) presence and/or PEP stanzas after logging in. Clients might take some time to acknowledge them, especially over slow (mobile) connections. --- src/mod_stream_mgmt.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl index 2f6b0fc71..2bf151a04 100644 --- a/src/mod_stream_mgmt.erl +++ b/src/mod_stream_mgmt.erl @@ -709,7 +709,7 @@ bounce_message_queue() -> %%%=================================================================== get_max_ack_queue(Host, Opts) -> gen_mod:get_module_opt(Host, ?MODULE, max_ack_queue, - gen_mod:get_opt(max_ack_queue, Opts, 1000)). + gen_mod:get_opt(max_ack_queue, Opts, 5000)). get_resume_timeout(Host, Opts) -> gen_mod:get_module_opt(Host, ?MODULE, resume_timeout,