From: Nick Porter Date: Fri, 7 Apr 2023 15:25:46 +0000 (+0100) Subject: Update sample ldap module to reflect trunk parameters X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78dc0cf3392fdd3daeda54437c5d58cf87396a26;p=thirdparty%2Ffreeradius-server.git Update sample ldap module to reflect trunk parameters Aligned with fr_trunk_config CONF_PARSER --- diff --git a/raddb/mods-available/ldap b/raddb/mods-available/ldap index 8e1c2ebf5e..69b996c069 100644 --- a/raddb/mods-available/ldap +++ b/raddb/mods-available/ldap @@ -714,11 +714,13 @@ ldap { # # ### Connection Pool # - # The connection pool is new for >= 3.0, and will be used in many - # modules, for all kinds of connection-related activity. + # The connection pool is a set of per-thread parameters for connections + # to the LDAP server. # - # When the server is not threaded, the connection pool limits are - # ignored, and only one connection is used. + # This connection pool is used for LDAP queries run as the administrative user. + # + # All LDAP operations are perfomed asynchronously, meaning that many queries + # can be active on a single connection simultaneously. # pool { # @@ -729,35 +731,27 @@ ldap { # Set to `0` to allow the server to start without the directory # being available. # - start = ${thread[pool].num_workers} + start = 0 # # min:: Minimum number of connections to keep open. # - min = ${thread[pool].num_workers} + min = 1 # # max:: Maximum number of connections. # - # 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. + # If these connections are all fully in use (refer to per_connection_max below) + # and a new one is requested, the request will NOT get a connection. # - max = ${thread[pool].num_workers} + max = 5 # - # spare:: Spare connections to be left idle. + # connecting:: Number of connections which can be starting at once # - # NOTE: Idle connections WILL be closed if `idle_timeout` - # is set. This should be less than or equal to `max` above. + # Used to throttle connection spawning. # - spare = 1 + connecting = 2 # # uses:: Number of uses before the connection is closed. @@ -766,49 +760,53 @@ ldap { # uses = 0 - # - # retry_delay:: 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 - # # lifetime:: The lifetime (in seconds) of the connection. # lifetime = 0 # - # idle_timeout:: Idle timeout (in seconds). - # - # A connection which is unused for this length of time will be closed. + # open_delay:: Open delay (in seconds). # - idle_timeout = 60 + # How long must we be above the target utilisation for connections to be openned. +# open_delay = 0.2 # - # connect_timeout:: Connection timeout (in seconds). + # close_delay:: Close delay (in seconds). + # + # How long we must be below the target utilisation for connections to be closed # - # The maximum amount of time to wait for a new connection to be established. +# close_delay = 10 + # - # NOTE: Sets `LDAP_OPT_NETWORK_TIMEOUT` in libldap. + # manage_interval:: How often to manage the connection pool. # - connect_timeout = 3.0 +# manage_interval = 0.2 # - # [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. - # ==== + # request:: Options specific to requests handled by this connection pool # + request { + # + # per_connection_max:: Maximum number of active queries there can be on a + # single connection. + # +# per_connection_max = 2000 + + # + # per_connection_target:: Target number of active queries on a single connection. + # +# per_connection_target = 1000 + + # + # free_delay:: How long must a request in the unassigned (free) list not have been + # used for before it's cleaned up and actually freed. + # + # Unassigned requests can be re-used, multiple times, reducing memory allocation + # and freeing overheads. + # +# free_delay = 10 + } } }