# memcached {
# options = "--SERVER=localhost"
# pool {
-# start = ${thread[pool].num_workers}
-# min = ${thread[pool].num_workers}
-# max = ${thread[pool].num_workers}
+# start = 0
+# min = 0
+# max =
# spare = 1
# uses = 0
# lifetime = 0
# password = 'supersecret'
# database = 0
# pool {
-# start = ${thread[pool].num_workers}
-# min = ${thread[pool].num_workers}
-# max = ${thread[pool].num_workers}
+# start = 0
+# min = 0
+# max =
# spare = 1
# uses = 0
# lifetime = 0
}
}
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
lifetime = 0
pool {
start = 5
min = 4
- max = 10
+# max =
spare = 3
uses = 0
lifetime = 0
keytab = /path/to/keytab
service_principal = name_of_principle
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
lifetime = 0
# tls_min_version = "1.2"
}
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
retry_delay = 30
escape_filenames = no
}
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
retry_delay = 30
# retry_with_normalised_username = no
}
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
retry_delay = 30
port = 6379
# password = thisisreallysecretandhardtoguess
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
retry_delay = 30
server = localhost
pool {
start = 0
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ min = 0
+# max =
spare = 1
uses = 0
lifetime = 0
# logfile = ${logdir}/sqllog.sql
# query_timeout = 5
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
retry_delay = 30
# attribute = "Winbind-Group"
}
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
spare = 1
uses = 0
retry_delay = 30
# client_id = 00000
# api_key = '000000000000000000000000'
pool {
- start = ${thread[pool].num_workers}
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
uses = 0
retry_delay = 30
lifetime = 86400
secret = $ENV{RADCLIENT_SECRET}
}
pool {
- start = 1
- min = 1
- max = 1
+ start = 0
+ min = 0
+# max =
}
}
}
#
# pool {
# start = 0
-# min = ${thread[pool].num_workers}
-# max = ${thread[pool].num_workers}
+# min = 0
+# max =
# spare = 1
# uses = 0
# lifetime = 0
# pool:: Connection pool.
#
# pool {
-# start = 0
-# min = ${thread[pool].num_workers}
-# max = ${thread[pool].num_workers}
+ start = 0
+ min = 0
+# max =
# spare = 1
# uses = 0
# lifetime = 0
pool {
#
# 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.
+ #
+ # 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
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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
+ # 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_'
+ # 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].num_workers}
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# spare:: Spare connections to be left idle.
# 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.
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# max:: Maximum number of connections.
# Setting `max` to MORE than the number of threads means
# that there are more connections than necessary.
#
- max = ${thread[pool].num_workers}
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# spare:: Spare connections to be left idle.
#
pool {
#
- # start::
+ # start:: Connections to create during module instantiation.
#
- # 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.
+ # Set to `0` to allow the server to start without the
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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
+ # 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'
+ # 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].num_workers}
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# spare:: Spare connections to be left idle.
#
pool {
#
- # start::
+ # start:: Connections to create during module instantiation.
#
- # 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.
+ # Set to `0` to allow the server to start without the
+ # external service being available.
#
start = 0
#
- # min::
+ # min:: Minimum number of connections to keep open.
#
- # Minimum number of connections to keep open.
- #
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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
+ # 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'
+ # 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].num_workers}
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# spare:: Spare connections to be left idle.
pool {
#
# 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.
+ # 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
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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
+ # 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'
+ # 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].num_workers}
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# spare:: Spare connections to be left idle.
pool {
start = 0
- min = ${thread[pool].num_workers}
- max = ${thread[pool].num_workers}
+ min = 0
+# max = 1
spare = 1
uses = 0
lifetime = 0
#
# 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 database being available.
+ # 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
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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.
+ # 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 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 MORE than the number of threads means that there are more
- # connections than necessary.
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
#
- max = ${thread[pool].num_workers}
+# max =
#
# spare:: Spare connections to be left idle.
#
pool {
#
- # start::
+ # start:: Connections to create during module instantiation.
#
- # 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.
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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
+ # 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'
+ # 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].num_workers}
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# spare:: Spare connections to be left idle.
#
pool {
#
- # start::
+ # start:: Connections to create during module instantiation.
#
- # 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.
+ # external service being available.
#
start = 0
#
# min:: Minimum number of connections to keep open.
#
- min = ${thread[pool].num_workers}
+ min = 0
#
# 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
+ # 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'
+ # 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].num_workers}
-
+ # If `max` is not specified, then it defaults to the number
+ # of workers configured.
+ #
+# max =
#
# uses:: Number of uses before the connection is closed.
#
typedef struct fr_pool_connection_s fr_pool_connection_t;
static int connection_check(fr_pool_t *pool, request_t *request);
+static int max_dflt(CONF_PAIR **out, void *parent, CONF_SECTION *cs, fr_token_t quote, CONF_PARSER const *rule);
/** An individual connection within the connection pool
*
static const CONF_PARSER pool_config[] = {
{ FR_CONF_OFFSET("start", FR_TYPE_UINT32, fr_pool_t, start), .dflt = "5" },
{ FR_CONF_OFFSET("min", FR_TYPE_UINT32, fr_pool_t, min), .dflt = "5" },
- { FR_CONF_OFFSET("max", FR_TYPE_UINT32, fr_pool_t, max), .dflt = "10" },
+ { FR_CONF_OFFSET("max", FR_TYPE_UINT32, fr_pool_t, max), .dflt_func = max_dflt },
{ FR_CONF_OFFSET("max_pending", FR_TYPE_UINT32, fr_pool_t, max_pending), .dflt = "0" },
{ FR_CONF_OFFSET("spare", FR_TYPE_UINT32, fr_pool_t, spare), .dflt = "3" },
{ FR_CONF_OFFSET("uses", FR_TYPE_UINT64, fr_pool_t, max_uses), .dflt = "0" },
CONF_PARSER_TERMINATOR
};
+static int max_dflt(CONF_PAIR **out, UNUSED void *parent, CONF_SECTION *cs, fr_token_t quote, CONF_PARSER const *rule)
+{
+ char *strvalue;
+
+ strvalue = talloc_asprintf(NULL, "%u", main_config->max_workers);
+ *out = cf_pair_alloc(cs, rule->name, strvalue, T_OP_EQ, T_BARE_WORD, quote);
+ talloc_free(strvalue);
+
+ return 0;
+}
+
/** Order connections by reserved most recently
*/
static int8_t last_reserved_cmp(void const *one, void const *two)