From: Alan T. DeKok Date: Sun, 6 Nov 2011 10:02:44 +0000 (+0100) Subject: Print WARNING if we fall below "min" connections X-Git-Tag: release_3_0_0_beta0~523 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a966a18e757bff638bbf725d6f9150b5026fe07d;p=thirdparty%2Ffreeradius-server.git Print WARNING if we fall below "min" connections We want to close idle sessions, sessions with max lifetime or max uses. BUT we want to enforce "min". The code will currently close a connection, notice "num < min", and spawn a new one. We warn the user that this is happening, so that they can fix their configuration. --- diff --git a/src/main/connection.c b/src/main/connection.c index 458bb34d819..af51d51426c 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -364,6 +364,11 @@ static int fr_connection_manage(fr_connection_pool_t *fc, DEBUG("%s: Closing expired connection (%i): Hit max_uses limit", fc->log_prefix, this->number); do_delete: + if ((fc->num <= fc->min) && + (fc->last_complained < now)) { + radlog(L_INFO, "WARNING in %s: You probably need to lower \"min\"", fc->log_prefix); + fc->last_complained = now; + } fr_connection_close(fc, this); return 0; }