Make pool config block more consistent, using values from the thread pool in more...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 23 Apr 2015 16:55:11 +0000 (17:55 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 23 Apr 2015 16:57:25 +0000 (17:57 +0100)
Also add a note about start = 0, and for relevant modules, set a default retry_delay of 30.

The retry_delay is required to make redundant blocks work correctly during a server outage, and not having it set by default seems to cause issues for some people.

raddb/mods-available/cache
raddb/mods-available/couchbase
raddb/mods-available/krb5
raddb/mods-available/ldap
raddb/mods-available/mschap
raddb/mods-available/redis
raddb/mods-available/rest
raddb/mods-available/sql
raddb/mods-available/yubikey

index 7a7db68..624bc09 100644 (file)
@@ -30,30 +30,29 @@ cache {
        #                          a cluster of RADIUS servers.
 #      driver = "rlm_cache_rbtree"
 
-#
-#      Some drivers accept specific options, to set them a
-#      config section with the the name as the driver should be added
-#      to the cache instance.
-#
-#      Driver specific options are:
-#
+       #
+       #  Some drivers accept specific options, to set them a
+       #  config section with the the name as the driver should be added
+       #  to the cache instance.
+       #
+       #  Driver specific options are:
+       #
 #      memcached {
 #              # Memcached configuration options, as documented here:
 #              #    http://docs.libmemcached.org/libmemcached_configuration.html#memcached
 #              options = "--SERVER=localhost"
 #
 #              pool {
-#                      start = 5
-#                      min = 4
+#                      start = ${thread[pool].start_servers}
+#                      min = ${thread[pool].min_spare_servers}
 #                      max = ${thread[pool].max_servers}
-#                      spare = 3
+#                      spare = ${thread[pool].max_spare_servers}
 #                      uses = 0
 #                      lifetime = 0
 #                      idle_timeout = 60
 #              }
 #      }
 
-
        #  The key used to index the cache.  It is dynamically expanded
        #  at run time.
        key = "%{User-Name}"
index 5cbd726..7746c2b 100644 (file)
@@ -123,74 +123,83 @@ couchbase {
        # Set to 'yes' to enable simultaneous use checking (multiple logins).
        # NOTE: This will cause the execution of a view request on every check
        # and may be a performance penalty.
-       #check_simul = no
+#      check_simul = no
 
        # Couchbase view that should return all account documents keyed by username.
-       #simul_view = "_design/acct/_view/by_user"
+#      simul_view = "_design/acct/_view/by_user"
 
        # The key to the above view.
        # NOTE: This will need to match EXACTLY what you emit from your view.
-       #simul_vkey = "%{tolower:%{%{Stripped-User-Name}:-%{User-Name}}}"
+#      simul_vkey = "%{tolower:%{%{Stripped-User-Name}:-%{User-Name}}}"
 
        # Set to 'yes' to enable verification of the results returned from the above view.
        # NOTE: This may be an additional performance penalty to the actual check and
        # should be avoided unless absolutely neccessary.
-       #verify_simul = no
+#      verify_simul = no
 
        # Remove stale session if checkrad does not see a double login.
        # NOTE: This will only be executed if both check_simul and verify_simul
        # are set to 'yes' above.
-       #delete_stale_sessions = yes
+#      delete_stale_sessions = yes
 
        #
        #  The connection pool is new for 3.0, and will be used in many
        #  modules, for all kinds of connection-related activity.
        #
        pool {
-               # Number of connections to start
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  couchbase being available.
                start = ${thread[pool].start_servers}
 
-               # Minimum number of connections to keep open
+               #  Minimum number of connections to keep open
                min = ${thread[pool].min_spare_servers}
 
-               # Maximum number of connections
+               #  Maximum number of connections
                #
-               # If these connections are all in use and a new one
-               # is requested, the request will NOT get a connection.
+               #  If these connections are all in use and a new one
+               #  is requested, the request will NOT get a connection.
                #
-               # NOTE: This should be greater than or equal to "min" above.
+               #  Setting 'max' to LESS than the number of threads means
+               #  that some threads may starve, and you will see errors
+               #  like 'No connections available and at max connection limit'
+               #
+               #  Setting 'max' to MORE than the number of threads means
+               #  that there are more connections than necessary.
                max = ${thread[pool].max_servers}
 
-               # Spare connections to be left idle
+               #  Spare connections to be left idle
                #
-               # NOTE: Idle connections WILL be closed if "idle_timeout"
-               # is set.  This should be less than or equal to "max" above.
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
                spare = ${thread[pool].max_spare_servers}
 
-               # Number of uses before the connection is closed
+               #  Number of uses before the connection is closed
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  0 means "infinite"
                uses = 0
 
-               # The lifetime (in seconds) of the connection
+               #  The lifetime (in seconds) of the connection
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  NOTE: A setting of 0 means infinite (no limit).
                lifetime = 0
 
-               # The idle timeout (in seconds).  A connection which is
-               # unused for this length of time will be closed.
+               #  The idle timeout (in seconds).  A connection which is
+               #  unused for this length of time will be closed.
                #
-               # NOTE: A setting of 0 means infinite (no timeout).
+               #  NOTE: A setting of 0 means infinite (no timeout).
                idle_timeout = 1200
 
-               # NOTE: All configuration settings are enforced.  If a
-               # connection is closed because of "idle_timeout",
-               # "uses", or "lifetime", then the total number of
-               # connections MAY fall below "min".  When that
-               # happens, it will open a new connection.  It will
-               # also log a WARNING message.
+               #  NOTE: All configuration settings are enforced.  If a
+               #  connection is closed because of "idle_timeout",
+               #  "uses", or "lifetime", then the total number of
+               #  connections MAY fall below "min".  When that
+               #  happens, it will open a new connection.  It will
+               #  also log a WARNING message.
                #
-               # The solution is to either lower the "min" connections,
-               # or increase lifetime/idle_timeout.
+               #  The solution is to either lower the "min" connections,
+               #  or increase lifetime/idle_timeout.
        }
 }
index 29a92b9..3b7e16d 100644 (file)
@@ -18,50 +18,59 @@ krb5 {
        #  that it was thread safe at compile time.
        #
        pool {
-               # Number of connections to start
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  KDC being available.
                start = ${thread[pool].start_servers}
 
-               # Minimum number of connections to keep open
+               #  Minimum number of connections to keep open
                min = ${thread[pool].min_spare_servers}
 
-               # Maximum number of connections
+               #  Maximum number of connections
                #
-               # If these connections are all in use and a new one
-               # is requested, the request will NOT get a connection.
+               #  If these connections are all in use and a new one
+               #  is requested, the request will NOT get a connection.
                #
-               # NOTE: This should be greater than or equal to "min" above.
+               #  Setting 'max' to LESS than the number of threads means
+               #  that some threads may starve, and you will see errors
+               #  like 'No connections available and at max connection limit'
+               #
+               #  Setting 'max' to MORE than the number of threads means
+               #  that there are more connections than necessary.
                max = ${thread[pool].max_servers}
 
-               # Spare connections to be left idle
+               #  Spare connections to be left idle
                #
-               # NOTE: Idle connections WILL be closed if "idle_timeout"
-               # is set.  This should be less than or equal to "max" above.
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
                spare = ${thread[pool].max_spare_servers}
 
-               # Number of uses before the connection is closed
+               #  Number of uses before the connection is closed
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  0 means "infinite"
                uses = 0
 
-               # The lifetime (in seconds) of the connection
+               #  The lifetime (in seconds) of the connection
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  NOTE: A setting of 0 means infinite (no limit).
                lifetime = 0
 
-               # The idle timeout (in seconds).  A connection which is
-               # unused for this length of time will be closed.
+               #  The idle timeout (in seconds).  A connection which is
+               #  unused for this length of time will be closed.
                #
-               # NOTE: A setting of 0 means infinite (no timeout).
+               #  NOTE: A setting of 0 means infinite (no timeout).
                idle_timeout = 0
 
-               # NOTE: All configuration settings are enforced.  If a
-               # connection is closed because of "idle_timeout",
-               # "uses", or "lifetime", then the total number of
-               # connections MAY fall below "min".  When that
-               # happens, it will open a new connection.  It will
-               # also log a WARNING message.
+               #  NOTE: All configuration settings are enforced.  If a
+               #  connection is closed because of "idle_timeout",
+               #  "uses", or "lifetime", then the total number of
+               #  connections MAY fall below "min".  When that
+               #  happens, it will open a new connection.  It will
+               #  also log a WARNING message.
                #
-               # The solution is to either lower the "min" connections,
-               # or increase lifetime/idle_timeout.
+               #  The solution is to either lower the "min" connections,
+               #  or increase lifetime/idle_timeout.
        }
 }
index 8922f3d..61139af 100644 (file)
@@ -464,11 +464,15 @@ ldap {
        #  When the server is not threaded, the connection pool
        #  limits are ignored, and only one connection is used.
        pool {
-               #  Number of connections to start
-               start = 5
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  directory being available.
+               start = ${thread[pool].start_servers}
 
                #  Minimum number of connections to keep open
-               min = 4
+               min = ${thread[pool].min_spare_servers}
 
                #  Maximum number of connections
                #
@@ -485,15 +489,20 @@ ldap {
 
                #  Spare connections to be left idle
                #
-               #  NOTE: Idle connections WILL be closed if 'idle_timeout'
-               #  is set.
-               spare = 3
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
+               spare = ${thread[pool].max_spare_servers}
 
                #  Number of uses before the connection is closed
                #
-               #  0 means 'infinite'
+               #  0 means "infinite"
                uses = 0
 
+               #  The number of seconds to wait after the server tries
+               #  to open a connection, and fails.  During this time,
+               #  no new connections will be opened.
+               retry_delay = 30
+
                #  The lifetime (in seconds) of the connection
                lifetime = 0
 
@@ -501,12 +510,6 @@ ldap {
                #  unused for this length of time will be closed.
                idle_timeout = 60
 
-               # The number of seconds to wait after the server tries
-               # to open a connection, and fails.  During this time,
-               # no new connections will be opened.
-               #
-               retry_delay = 1
-
                #  NOTE: All configuration settings are enforced.  If a
                #  connection is closed because of 'idle_timeout',
                #  'uses', or 'lifetime', then the total number of
index 6608b7d..4673fa7 100644 (file)
@@ -84,56 +84,70 @@ mschap {
        #  connection pool.
        #
        pool {
-               # Number of connections to start
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  winbind daemon being available.
                start = ${thread[pool].start_servers}
 
-               # Minimum number of connections to keep open
+               #  Minimum number of connections to keep open
                min = ${thread[pool].min_spare_servers}
 
-               # Maximum number of connections
+               #  Maximum number of connections
                #
-               # If these connections are all in use and a new one
-               # is requested, the request will NOT get a connection.
+               #  If these connections are all in use and a new one
+               #  is requested, the request will NOT get a connection.
                #
-               # NOTE: This should be greater than or equal to "min" above.
+               #  Setting 'max' to LESS than the number of threads means
+               #  that some threads may starve, and you will see errors
+               #  like 'No connections available and at max connection limit'
+               #
+               #  Setting 'max' to MORE than the number of threads means
+               #  that there are more connections than necessary.
                max = ${thread[pool].max_servers}
 
-               # Spare connections to be left idle
+               #  Spare connections to be left idle
                #
-               # NOTE: Idle connections WILL be closed if "idle_timeout"
-               # is set.  This should be less than or equal to "max" above.
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
                spare = ${thread[pool].max_spare_servers}
 
-               # Number of uses before the connection is closed
+               #  Number of uses before the connection is closed
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  0 means "infinite"
                uses = 0
 
-               # The lifetime (in seconds) of the connection
+               #  The number of seconds to wait after the server tries
+               #  to open a connection, and fails.  During this time,
+               #  no new connections will be opened.
+               retry_delay = 30
+
+               #  The lifetime (in seconds) of the connection
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  NOTE: A setting of 0 means infinite (no limit).
                lifetime = 86400
 
-               # The pool is checked for free connections every
-               # "cleanup_interval".  If there are free connections,
-               # then one of them is closed.
+               #  The pool is checked for free connections every
+               #  "cleanup_interval".  If there are free connections,
+               #  then one of them is closed.
                cleanup_interval = 300
 
-               # The idle timeout (in seconds).  A connection which is
-               # unused for this length of time will be closed.
+               #  The idle timeout (in seconds).  A connection which is
+               #  unused for this length of time will be closed.
                #
-               # NOTE: A setting of 0 means infinite (no timeout).
+               #  NOTE: A setting of 0 means infinite (no timeout).
                idle_timeout = 600
 
-               # NOTE: All configuration settings are enforced.  If a
-               # connection is closed because of "idle_timeout",
-               # "uses", or "lifetime", then the total number of
-               # connections MAY fall below "min".  When that
-               # happens, it will open a new connection.  It will
-               # also log a WARNING message.
+               #  NOTE: All configuration settings are enforced.  If a
+               #  connection is closed because of "idle_timeout",
+               #  "uses", or "lifetime", then the total number of
+               #  connections MAY fall below "min".  When that
+               #  happens, it will open a new connection.  It will
+               #  also log a WARNING message.
                #
-               # The solution is to either lower the "min" connections,
-               # or increase lifetime/idle_timeout.
+               #  The solution is to either lower the "min" connections,
+               #  or increase lifetime/idle_timeout.
        }
 
        passchange {
index 8d9a041..0ef8675 100644 (file)
@@ -25,55 +25,69 @@ redis {
        #  connection pool.
        #
        pool {
-               # Number of connections to start
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  web service being available.
                start = ${thread[pool].start_servers}
 
-               # Minimum number of connections to keep open
+               #  Minimum number of connections to keep open
                min = ${thread[pool].min_spare_servers}
 
-               # Maximum number of connections
+               #  Maximum number of connections
                #
-               # If these connections are all in use and a new one
-               # is requested, the request will NOT get a connection.
+               #  If these connections are all in use and a new one
+               #  is requested, the request will NOT get a connection.
                #
-               # NOTE: This should be greater than or equal to "min" above.
+               #  Setting 'max' to LESS than the number of threads means
+               #  that some threads may starve, and you will see errors
+               #  like 'No connections available and at max connection limit'
+               #
+               #  Setting 'max' to MORE than the number of threads means
+               #  that there are more connections than necessary.
                max = ${thread[pool].max_servers}
 
-               # Spare connections to be left idle
+               #  Spare connections to be left idle
                #
-               # NOTE: Idle connections WILL be closed if "idle_timeout"
-               # is set.  This should be less than or equal to "max" above.
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
                spare = ${thread[pool].max_spare_servers}
 
-               # Number of uses before the connection is closed
+               #  Number of uses before the connection is closed
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  0 means "infinite"
                uses = 0
 
-               # The lifetime (in seconds) of the connection
+               #  The number of seconds to wait after the server tries
+               #  to open a connection, and fails.  During this time,
+               #  no new connections will be opened.
+               retry_delay = 30
+
+               #  The lifetime (in seconds) of the connection
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  NOTE: A setting of 0 means infinite (no limit).
                lifetime = 86400
 
-               # The pool is checked for free connections every
-               # "cleanup_interval".  If there are free connections,
-               # then one of them is closed.
+               #  The pool is checked for free connections every
+               #  "cleanup_interval".  If there are free connections,
+               #  then one of them is closed.
                cleanup_interval = 300
 
-               # The idle timeout (in seconds).  A connection which is
-               # unused for this length of time will be closed.
+               #  The idle timeout (in seconds).  A connection which is
+               #  unused for this length of time will be closed.
                #
-               # NOTE: A setting of 0 means infinite (no timeout).
+               #  NOTE: A setting of 0 means infinite (no timeout).
                idle_timeout = 600
 
-               # NOTE: All configuration settings are enforced.  If a
-               # connection is closed because of "idle_timeout",
-               # "uses", or "lifetime", then the total number of
-               # connections MAY fall below "min".  When that
-               # happens, it will open a new connection.  It will
-               # also log a WARNING message.
+               #  NOTE: All configuration settings are enforced.  If a
+               #  connection is closed because of "idle_timeout",
+               #  "uses", or "lifetime", then the total number of
+               #  connections MAY fall below "min".  When that
+               #  happens, it will open a new connection.  It will
+               #  also log a WARNING message.
                #
-               # The solution is to either lower the "min" connections,
-               # or increase lifetime/idle_timeout.
+               #  The solution is to either lower the "min" connections,
+               #  or increase lifetime/idle_timeout.
        }
 }
index a79262d..19843c7 100644 (file)
@@ -171,51 +171,60 @@ rest {
        #  modules, for all kinds of connection-related activity.
        #
        pool {
-               # For this module pool.start only controls the number of handles created
-               # not the number of connections started.
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  web service being available.
                start = ${thread[pool].start_servers}
 
-               # Minimum number of connections to keep open
+               #  Minimum number of connections to keep open
                min = ${thread[pool].min_spare_servers}
 
-               # Maximum number of connections
+               #  Maximum number of connections
                #
-               # If these connections are all in use and a new one
-               # is requested, the request will NOT get a connection.
+               #  If these connections are all in use and a new one
+               #  is requested, the request will NOT get a connection.
                #
-               # NOTE: This should be greater than or equal to "min" above.
+               #  Setting 'max' to LESS than the number of threads means
+               #  that some threads may starve, and you will see errors
+               #  like 'No connections available and at max connection limit'
+               #
+               #  Setting 'max' to MORE than the number of threads means
+               #  that there are more connections than necessary.
                max = ${thread[pool].max_servers}
 
-               # Spare connections to be left idle
+               #  Spare connections to be left idle
                #
-               # NOTE: Idle connections WILL be closed if "idle_timeout"
-               # is set.  This should be less than or equal to "max" above.
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
                spare = ${thread[pool].max_spare_servers}
 
-               # Number of uses before the connection is closed
+               #  Number of uses before the connection is closed
                #
-               # NOTE: A setting of 0 means infinite (no limit).
+               # 0 means "infinite"
                uses = 0
 
-               # The lifetime (in seconds) of the connection
-               #
-               # NOTE: A setting of 0 means infinite (no limit).
+               #  The number of seconds to wait after the server tries
+               #  to open a connection, and fails.  During this time,
+               #  no new connections will be opened.
+               retry_delay = 30
+
+               #  The lifetime (in seconds) of the connection
                lifetime = 0
 
-               # The idle timeout (in seconds).  A connection which is
-               # unused for this length of time will be closed.
-               #
-               # NOTE: A setting of 0 means infinite (no timeout).
+               #  idle timeout (in seconds).  A connection which is
+               #  unused for this length of time will be closed.
                idle_timeout = 60
 
-               # NOTE: All configuration settings are enforced.  If a
-               # connection is closed because of "idle_timeout",
-               # "uses", or "lifetime", then the total number of
-               # connections MAY fall below "min".  When that
-               # happens, it will open a new connection.  It will
-               # also log a WARNING message.
+               #  NOTE: All configuration settings are enforced.  If a
+               #  connection is closed because of "idle_timeout",
+               #  "uses", or "lifetime", then the total number of
+               #  connections MAY fall below "min".  When that
+               #  happens, it will open a new connection.  It will
+               #  also log a WARNING message.
                #
-               # The solution is to either lower the "min" connections,
-               # or increase lifetime/idle_timeout.
+               #  The solution is to either lower the "min" connections,
+               #  or increase lifetime/idle_timeout.
        }
 }
index 8511132..a005045 100644 (file)
@@ -47,7 +47,7 @@ sql {
 #
 #              # If the file above does not exist and bootstrap is set
 #              # a new database file will be created, and the SQL statements
-#              # contained within the file will be executed.
+#              # contained within the bootstrap file will be executed.
 #              bootstrap = "${modconfdir}/${..:name}/main/sqlite/schema.sql"
 #      }
 #
@@ -63,7 +63,7 @@ sql {
 #
 #              # If yes, (or auto and libmysqlclient reports warnings are
 #              # available), will retrieve and log additional warnings from
-#              # the server, if an error has occured. Defaults to 'auto'
+#              # the server if an error has occured. Defaults to 'auto'
 #              warnings = auto
 #      }
 #
@@ -166,59 +166,61 @@ sql {
        #       }
        #
        pool {
-               # Number of connections to start
-               start = 5
+               #  Connections to create during module instantiation.
+               #  If the server cannot create specified number of
+               #  connections during instantiation it will exit.
+               #  Set to 0 to allow the server to start without the
+               #  database being available.
+               start = ${thread[pool].start_servers}
 
-               # Minimum number of connections to keep open
-               min = 4
+               #  Minimum number of connections to keep open
+               min = ${thread[pool].min_spare_servers}
 
-               # Maximum number of connections
+               #  Maximum number of connections
                #
-               # If these connections are all in use and a new one
-               # is requested, the request will NOT get a connection.
+               #  If these connections are all in use and a new one
+               #  is requested, the request will NOT get a connection.
                #
-               # Setting 'max' to LESS than the number of threads means
-               # that some threads may starve, and you will see errors
-               # like "No connections available and at max connection limit"
-               #
-               # Setting 'max' to MORE than the number of threads means
-               # that there are more connections than necessary.
+               #  Setting 'max' to LESS than the number of threads means
+               #  that some threads may starve, and you will see errors
+               #  like 'No connections available and at max connection limit'
                #
+               #  Setting 'max' to MORE than the number of threads means
+               #  that there are more connections than necessary.
                max = ${thread[pool].max_servers}
 
-               # Spare connections to be left idle
+               #  Spare connections to be left idle
                #
-               # NOTE: Idle connections WILL be closed if "idle_timeout"
-               # is set.
-               spare = 3
+               #  NOTE: Idle connections WILL be closed if "idle_timeout"
+               #  is set.  This should be less than or equal to "max" above.
+               spare = ${thread[pool].max_spare_servers}
 
-               # Number of uses before the connection is closed
+               #  Number of uses before the connection is closed
                #
-               # 0 means "infinite"
+               #  0 means "infinite"
                uses = 0
 
+               #  The number of seconds to wait after the server tries
+               #  to open a connection, and fails.  During this time,
+               #  no new connections will be opened.
+               retry_delay = 30
+
                # The lifetime (in seconds) of the connection
                lifetime = 0
 
-               # idle timeout (in seconds).  A connection which is
-               # unused for this length of time will be closed.
+               #  idle timeout (in seconds).  A connection which is
+               #  unused for this length of time will be closed.
                idle_timeout = 60
 
-               # The number of seconds to wait after the server tries
-               # to open a connection, and fails.  During this time,
-               # no new connections will be opened.
-               #
-               retry_delay = 1
-
-               # NOTE: All configuration settings are enforced.  If a
-               # connection is closed because of "idle_timeout",
-               # "uses", or "lifetime", then the total number of
-               # connections MAY fall below "min".  When that
-               # happens, it will open a new connection.  It will
-               # also log a WARNING message.
+               #  NOTE: All configuration settings are enforced.  If a
+               #  connection is closed because of "idle_timeout",
+               #  "uses", or "lifetime", then the total number of
+               #  connections MAY fall below "min".  When that
+               #  happens, it will open a new connection.  It will
+               #  also log a WARNING message.
                #
-               # The solution is to either lower the "min" connections,
-               # or increase lifetime/idle_timeout.
+               #  The solution is to either lower the "min" connections,
+               #  or increase lifetime/idle_timeout.
        }
 
        # Set to 'yes' to read radius clients from the database ('nas' table)
index 7714891..f555db7 100644 (file)
@@ -25,7 +25,7 @@ yubikey {
        #  The module itself does not provide persistent storage as this
        #  would be duplicative of functionality already in the server.
        #
-       #  Yubikey authentication needs two attributes retrieved from 
+       #  Yubikey authentication needs two attributes retrieved from
        #  persistent storage:
        #    * &control:Yubikey-Key        - The AES key used to decrypt the OTP data.
        #                                    The Yubikey-Public-Id and/or User-Name
@@ -96,55 +96,63 @@ yubikey {
                #  Connection pool parameters
                #
                pool {
-                       # Number of connections to start
+                       #  Connections to create during module instantiation.
+                       #  If the server cannot create specified number of
+                       #  connections during instantiation it will exit.
+                       #  Set to 0 to allow the server to start without the
+                       #  yubikey server being available.
                        start = ${thread[pool].start_servers}
 
-                       # Minimum number of connections to keep open
+                       #  Minimum number of connections to keep open
                        min = ${thread[pool].min_spare_servers}
 
-                       # Maximum number of connections
+                       #  Maximum number of connections
                        #
-                       # If these connections are all in use and a new one
-                       # is requested, the request will NOT get a connection.
+                       #  If these connections are all in use and a new one
+                       #  is requested, the request will NOT get a connection.
                        #
-                       # NOTE: This should be greater than or equal to "min" above.
-                       max = ${thread[pool].max_servers}
-
-                       # Spare connections to be left idle
+                       #  Setting 'max' to LESS than the number of threads means
+                       #  that some threads may starve, and you will see errors
+                       #  like 'No connections available and at max connection limit'
                        #
-                       # NOTE: Idle connections WILL be closed if "idle_timeout"
-                       # is set.  This should be less than or equal to "max" above.
-                       spare = ${thread[pool].max_spare_servers}
+                       #  Setting 'max' to MORE than the number of threads means
+                       #  that there are more connections than necessary.
+                       max = ${thread[pool].max_servers}
 
-                       # Number of uses before the connection is closed
+                       #  Number of uses before the connection is closed
                        #
-                       # NOTE: A setting of 0 means infinite (no limit).
+                       #  NOTE: A setting of 0 means infinite (no limit).
                        uses = 0
 
-                       # The lifetime (in seconds) of the connection
+                       #  The number of seconds to wait after the server tries
+                       #  to open a connection, and fails.  During this time,
+                       #  no new connections will be opened.
+                       retry_delay = 30
+
+                       #  The lifetime (in seconds) of the connection
                        #
-                       # NOTE: A setting of 0 means infinite (no limit).
+                       #  NOTE: A setting of 0 means infinite (no limit).
                        lifetime = 0
 
-                       # The idle timeout (in seconds).  A connection which is
-                       # unused for this length of time will be closed.
+                       #  The idle timeout (in seconds).  A connection which is
+                       #  unused for this length of time will be closed.
                        #
-                       # NOTE: A setting of 0 means infinite (no timeout).
+                       #  NOTE: A setting of 0 means infinite (no timeout).
                        idle_timeout = 60
 
-                       # Cycle over all connections in a pool instead of concentrating
-                       # connection use on a few connections.
+                       #  Cycle over all connections in a pool instead of concentrating
+                       #  connection use on a few connections.
                        spread = yes
 
-                       # NOTE: All configuration settings are enforced.  If a
-                       # connection is closed because of "idle_timeout",
-                       # "uses", or "lifetime", then the total number of
-                       # connections MAY fall below "min".  When that
-                       # happens, it will open a new connection.  It will
-                       # also log a WARNING message.
+                       #  NOTE: All configuration settings are enforced.  If a
+                       #  connection is closed because of "idle_timeout",
+                       #  "uses", or "lifetime", then the total number of
+                       #  connections MAY fall below "min".  When that
+                       #  happens, it will open a new connection.  It will
+                       #  also log a WARNING message.
                        #
-                       # The solution is to either lower the "min" connections,
-                       # or increase lifetime/idle_timeout.
+                       #  The solution is to either lower the "min" connections,
+                       #  or increase lifetime/idle_timeout.
                }
        }
 }