Suggested improvement to connection spawning info

Chaigneau, Nicolas nicolas.chaigneau at capgemini.com
Thu Aug 7 17:14:24 CEST 2014


Thanks for the update!



Not related to this change, a minor issue I've noticed: the "Warning" message is not prefixed (contrary to "Error" or "Info" messages).

Eg, we have something like:

Thu Aug  7 17:08:51 2014 : rlm_sql (...): 0 of 0 connections in use.  You probably need to increase "spare"
Thu Aug  7 17:08:51 2014 : Info: rlm_sql (...): Opening additional connection (64)


This is because, in file src/main/log.c, the "levels" list has no entry for L_WARN.
It probably should include something like that:

	{ ": Warning: ",	L_WARN		},



Regards,
Nicolas.


-----Message d'origine-----
De : freeradius-devel-bounces+nchaigne=capgemini.fr at lists.freeradius.org [mailto:freeradius-devel-bounces+nchaigne=capgemini.fr at lists.freeradius.org] De la part de Arran Cudbard-Bell
Envoyé : mercredi 6 août 2014 18:39
À : FreeRadius developers mailing list
Objet : Re: Suggested improvement to connection spawning info


On 6 Aug 2014, at 12:04, Chaigneau, Nicolas <nicolas.chaigneau at capgemini.com> wrote:

>  
> In function fr_connection_spawn (src\main\connection.c), the following INFO message is logged:
>  
> INFO("%s: Opening additional connection (%" PRIu64 ")", 
> pool->log_prefix, pool->count);
>  
> The value logged is the number of times a new connection has been spawned on that pool.
> What could be interesting (at least to me) would be to also show the current number of connections, and the number of busy connections.
>  
> So, what do you think of something like :
>  
> INFO("%s: Opening additional connection (spawned: %" PRIu64 ", num: 
> %d, active: %d) ", pool->log_prefix, pool->count, pool->num, 
> pool->active);

I agree it's useful to report the number of connections in use, as it tells the admin whether the spawning is just to keep spares in the pool, or whether traffic has ramped up hard, and we need a connection *now*.

In fact the *now* case should probably be a WARN, as it's likely the server is about to start failing to process requests.

	WARN("%s: %i of %i connections in use.  You probably need to increase \"spare\"",
	     pool->log_prefix, pool->active, pool->count);

Anyway... added. See what you think.



Arran Cudbard-Bell <a.cudbardb at freeradius.org> FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2



More information about the Freeradius-Devel mailing list