From: Arran Cudbard-Bell Date: Mon, 7 Nov 2016 18:32:29 +0000 (-0500) Subject: Sometimes we're spawning to reach min not spare X-Git-Tag: release_3_0_13~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc2a6ba745837b5cc28a031feb6df94d93f2e7b0;p=thirdparty%2Ffreeradius-server.git Sometimes we're spawning to reach min not spare --- diff --git a/src/main/connection.c b/src/main/connection.c index 81c89635d59..ccc74e2fcf9 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -647,6 +647,8 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool) spawn = pool->min - (pool->num + pool->pending); extra = 0; + ROPTIONAL(RINFO, INFO, "Need %i more connections to reach min connections (%i)", spawn, pool->min); + /* * If we're about to create more than "max", * don't create more. @@ -678,6 +680,8 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool) spawn = pool->max - (pool->num + pool->pending); } + ROPTIONAL(RINFO, INFO, "Need %i more connections to reach %i spares", spawn, pool->spare); + /* * min < num < max * @@ -712,8 +716,6 @@ static int fr_connection_pool_check(fr_connection_pool_t *pool) * a connection. Avoids spurious log messages. */ if (spawn) { - INFO("%s: Need %i more connections to reach %i spares", - pool->log_prefix, spawn, pool->spare); pthread_mutex_unlock(&pool->mutex); fr_connection_spawn(pool, now, false); /* ignore return code */ pthread_mutex_lock(&pool->mutex); @@ -838,7 +840,7 @@ static void *fr_connection_get_internal(fr_connection_pool_t *pool, bool spawn) } pthread_mutex_unlock(&pool->mutex); - + if (!RATE_LIMIT_ENABLED || complain) { ERROR("%s: No connections available and at max connection limit", pool->log_prefix); }