]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more notes on connection starvation
authorAlan T. DeKok <aland@freeradius.org>
Wed, 29 Nov 2023 15:25:48 +0000 (10:25 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 16 Feb 2024 21:21:33 +0000 (16:21 -0500)
raddb/mods-available/sql

index cfeac63ea87c30fead8457af6d10f5c3a0f48aef..34ec56509f1160f39b408f409b960fcbc0597c92 100644 (file)
@@ -286,6 +286,23 @@ sql {
                #
                #  Setting 'max' to MORE than the number of threads means
                #  that there are more connections than necessary.
+               #
+               #  The setting here should be lower than the maximum
+               #  number of connections allowed by the database.
+               #
+               #  i.e. There is no point in telling FreeRADIUS to use
+               #  64 connections, while the database is limited to 32
+               #  connections.  That configuration will cause the
+               #  server to be "starved" of connections, and it will
+               #  block during normal operations, even when the
+               #  database is largely idle.
+               #
+               #  At the same time, if the database is slow, there is
+               #  no point in increasing "max".  More connections
+               #  will just cause the database to run more slowly.
+               #  The correct fix for a slow database is to fix it, so
+               #  that it responds to FreeRADIUS quickly.
+               #
                max = ${thread[pool].max_servers}
 
                #  Spare connections to be left idle