Set the max # of SQL sockets to the max # of threads
authorAlan T. DeKok <aland@freeradius.org>
Fri, 4 Apr 2014 13:00:37 +0000 (09:00 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 4 Apr 2014 13:00:37 +0000 (09:00 -0400)
raddb/sql.conf

index 690c3a2..6f346ec 100644 (file)
@@ -74,7 +74,15 @@ sql {
        sqltracefile = ${logdir}/sqltrace.sql
 
        # number of sql connections to make to server
-       num_sql_socks = 5
+       #
+       # Setting this 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 this to MORE than the number of threads means
+       # that there are more connections than necessary.
+       # 
+       num_sql_socks = ${thread[pool].max_servers}
 
        # number of seconds to dely retrying on a failed database
        # connection (per_socket)