new rlm_sql connection pool logic

Alan DeKok aland at deployingradius.com
Mon Oct 17 22:01:03 CEST 2011


Phil Mayers wrote:
> SQL pool seems to work, 

  Good.  I've added some code to limit failed connection attempts.  If a
connection fails, it won't try opening a new connection until at least 1
second has passed.

  I've also reworked the mutex locks when opening a new connection.  The
new connection is now opened *without* the mutex lock being held.  This
means that existing (i.e. working) connections can be grabbed from the
pool while it's opening a new connection.

  i.e. if there's suddenly an issue which prevents new connections from
being opened, existing ones can still be used && released.

  The next thing is to limit the number of connections to one if there
are no threads.  It makes no sense to open a dozen connections when the
server is running in debugging mode.

  Alan DeKok.



More information about the Freeradius-Devel mailing list