]> 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>
Wed, 29 Nov 2023 15:26:06 +0000 (10:26 -0500)
raddb/mods-available/sql

index db58421edebd77e22b0c2c0d885c63128e24fa18..68ac4da753b5db0671e2cd1bd1589daec4bf1b1e 100644 (file)
@@ -291,6 +291,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