rlm_sql_null: No connections available and at max connection limit

Artis Caune artis.caune at gmail.com
Thu Jun 3 22:17:55 CEST 2021


Hi guys,

We use rlm_sql_null for accounting and auth logs which allow us to respond
quickly and defer inserts from regional nodes when db or link is down.

Config is simple:

accounting {
    ...
    sql_accounting
}

sql sql_accounting {
        driver = "rlm_sql_null"
        accounting {
                logfile = "${sql_write_dir}/accounting.sql"
                query = "INSERT INTO accounting ..."
        }
}

We get around 10-15 auth requests per sec and I don't see any errors for
post-auth log.
But we get around 180-200 acct requests per sec and I'm getting those
errors for rlm_sql_null module:
rlm_sql (sql_accounting): Cannot open new connection, already at max
rlm_sql (sql_accounting): No connections available and at max connection
limit

README.rst says we can leave the pool definition or delete it for _null
module.

Wondering if there are some tweaks for the null module or it's a bug as
there should be no max connection limit on this module ?




Also noticed that null module tries to connect to radius table but no
db_name is configured:
rlm_sql (sql_accounting): Driver rlm_sql_null (module rlm_sql_null) loaded
and linked
rlm_sql (sql_accounting): Attempting to connect to database "radius"

Why is it trying to connect to something if it should just append to
logfile ?


Thanks,
Artis


More information about the Freeradius-Users mailing list