rml_sqlcounter dailycounter do not reset

Prabhpal S. Mavi prabhpal at digital-infotech.net
Wed Jan 9 10:09:22 CET 2013

Dear List Members,

i have come across the problem that "dailycounter" that is
(rlm_sqlcounter) do not reset. Users are rejected by the following

"Your maximum daily usage time has been reached"

i am trying to figure out the cause but unable to.

Counter & Query in use:

sqlcounter dailycounter {
                counter-name = "Daily-Session-Time"
                check-name = "Max-Daily-Session"
                reply-name = "Session-Timeout"
                sqlmod-inst = "sql"
                key = "User-Name"
                reset = "daily"
                cache-size = 5000
                query = "SELECT SUM(acctsessiontime - GREATEST((%b -
UNIX_TIMESTAMP(acctstarttime)), 0)) FROM radacct WHERE
username = '%{%k}' AND UNIX_TIMESTAMP(acctstarttime) +
acctsessiontime > '%b'"

rlm_sqlcounter: (Check item - counter) is less than zero
rlm_sqlcounter: Rejected user prabhpal, check_item=3600, counter=2147056619
++[dailycounter] returns reject


More information about the Freeradius-Users mailing list