From: Alan T. DeKok Date: Wed, 8 Aug 2018 13:57:33 +0000 (-0400) Subject: use num_workers in pool instead of min/max/spare servers X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b2c5fb567014ef3abba979d537cd56fea57f586;p=thirdparty%2Ffreeradius-server.git use num_workers in pool instead of min/max/spare servers We've got to clean up the connection pool code, too... --- diff --git a/raddb/mods-available/cache b/raddb/mods-available/cache index db2bad92ffc..93b35a07fda 100644 --- a/raddb/mods-available/cache +++ b/raddb/mods-available/cache @@ -47,9 +47,9 @@ cache { # options = "--SERVER=localhost" # # pool { -# start = ${thread[pool].start_servers} -# min = ${thread[pool].min_spare_servers} -# max = ${thread[pool].max_servers} +# start = ${thread[pool].num_workers} +# min = ${thread[pool].num_workers} +# max = ${thread[pool].num_workers} # spare = ${thread[pool].max_spare_servers} # uses = 0 # lifetime = 0 @@ -84,9 +84,9 @@ cache { # database = 0 # # pool { -# start = ${thread[pool].start_servers} -# min = ${thread[pool].min_spare_servers} -# max = ${thread[pool].max_servers} +# start = ${thread[pool].num_workers} +# min = ${thread[pool].num_workers} +# max = ${thread[pool].num_workers} # spare = ${thread[pool].max_spare_servers} # uses = 0 # lifetime = 0 diff --git a/raddb/mods-available/couchbase b/raddb/mods-available/couchbase index 075a3b17b47..71a29f97986 100644 --- a/raddb/mods-available/couchbase +++ b/raddb/mods-available/couchbase @@ -124,10 +124,10 @@ couchbase { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -140,7 +140,7 @@ couchbase { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/krb5 b/raddb/mods-available/krb5 index 3b7e16ddc86..27ff3bc4928 100644 --- a/raddb/mods-available/krb5 +++ b/raddb/mods-available/krb5 @@ -23,10 +23,10 @@ krb5 { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -39,7 +39,7 @@ krb5 { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/ldap b/raddb/mods-available/ldap index 24b9c7bd6a6..abf0882d3ea 100644 --- a/raddb/mods-available/ldap +++ b/raddb/mods-available/ldap @@ -498,10 +498,10 @@ ldap { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -514,7 +514,7 @@ ldap { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/linelog b/raddb/mods-available/linelog index 2183af83fa9..8ccfdbffad7 100644 --- a/raddb/mods-available/linelog +++ b/raddb/mods-available/linelog @@ -105,10 +105,10 @@ linelog { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -121,7 +121,7 @@ linelog { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/mschap b/raddb/mods-available/mschap index 626756c6dcf..47f02613719 100644 --- a/raddb/mods-available/mschap +++ b/raddb/mods-available/mschap @@ -104,10 +104,10 @@ mschap { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -120,7 +120,7 @@ mschap { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/redis b/raddb/mods-available/redis index f497f8096d3..0f3bb35e8e9 100644 --- a/raddb/mods-available/redis +++ b/raddb/mods-available/redis @@ -42,10 +42,10 @@ redis { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -58,7 +58,7 @@ redis { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/redis_ippool b/raddb/mods-available/redis_ippool index 8c04f9ce785..6dc06e9c92c 100644 --- a/raddb/mods-available/redis_ippool +++ b/raddb/mods-available/redis_ippool @@ -76,8 +76,8 @@ redis_ippool { pool { start = 0 - min = ${thread[pool].min_spare_servers} - max = ${thread[pool].max_servers} + min = ${thread[pool].num_workers} + max = ${thread[pool].num_workers} spare = ${thread[pool].max_spare_servers} uses = 0 lifetime = 0 diff --git a/raddb/mods-available/rest b/raddb/mods-available/rest index 33c8d4db090..4c97324ec01 100644 --- a/raddb/mods-available/rest +++ b/raddb/mods-available/rest @@ -200,10 +200,10 @@ rest { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -216,7 +216,7 @@ rest { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/sql b/raddb/mods-available/sql index 56f62710673..8d961577051 100644 --- a/raddb/mods-available/sql +++ b/raddb/mods-available/sql @@ -137,10 +137,10 @@ sql { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -153,7 +153,7 @@ sql { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/winbind b/raddb/mods-available/winbind index 8d2d970d786..02ab910d99d 100644 --- a/raddb/mods-available/winbind +++ b/raddb/mods-available/winbind @@ -69,10 +69,10 @@ winbind { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -85,7 +85,7 @@ winbind { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Spare connections to be left idle # diff --git a/raddb/mods-available/yubikey b/raddb/mods-available/yubikey index 38ac6af72b4..f1d4f3a3be7 100644 --- a/raddb/mods-available/yubikey +++ b/raddb/mods-available/yubikey @@ -127,10 +127,10 @@ yubikey { # 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} + start = ${thread[pool].num_workers} # Minimum number of connections to keep open - min = ${thread[pool].min_spare_servers} + min = ${thread[pool].num_workers} # Maximum number of connections # @@ -143,7 +143,7 @@ yubikey { # # Setting 'max' to MORE than the number of threads means # that there are more connections than necessary. - max = ${thread[pool].max_servers} + max = ${thread[pool].num_workers} # Number of uses before the connection is closed #