From 13bac0b96a129be5195b72a4100d6cd24a93d23e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 22 May 2017 12:44:27 +0100 Subject: [PATCH] [Fix] Reduce maps aggressiveness --- src/libserver/cfg_utils.c | 2 +- src/libutil/map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 982415fdb..2791c28d4 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -35,7 +35,7 @@ #define DEFAULT_RLIMIT_NOFILE 2048 #define DEFAULT_RLIMIT_MAXCORE 0 -#define DEFAULT_MAP_TIMEOUT 10 +#define DEFAULT_MAP_TIMEOUT 60.0 * 5 #define DEFAULT_MIN_WORD 4 #define DEFAULT_MAX_WORD 40 #define DEFAULT_WORDS_DECAY 200 diff --git a/src/libutil/map.c b/src/libutil/map.c index aefd8eb08..b8d04dc5d 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -859,7 +859,7 @@ rspamd_map_schedule_periodic (struct rspamd_map *map, timeout = map->poll_timeout * error_mult; } else if (locked) { - timeout = lock_mult; + timeout = map->poll_timeout * lock_mult; } cbd = g_slice_alloc0 (sizeof (*cbd)); -- 2.39.5