Acounting problem with SQL and detail files

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Feb 12 16:05:28 CET 2014


On 12 Feb 2014, at 14:17, Aurélien Lafranchise <aurelien.lafranchise at mobiquithings.com> wrote:

> Thanks for your answer.
> 
> I am looking for redundancy, if SQL does not work I can count on detail files. If the SQL problem blocks the whole FreeRADIUS server I think there is a problem of design (might be resolved in later version?).

Honestly the best solution is to run another instance of FreeRADIUS which just writes to detail files,
and use a front end load balancer (you can use FreeRADIUS for this also).

> You may answer "work-as-design", but could you confirm? Why there is no protection against blocked SQL server to let FreeRADIUS process queries ?

FreeRADIUS doesn't block, the client library blocks, or more the system call the client library made
blocks.

From the point where the worker calls a function in the client library, there is no way to force
that call to return cleanly.

Even if you kill the worker thread, the connection structures that were passed into the library may
not be in a consistent state, so when you come to use it, or free it, you may get random memory 
errors which cause the server process to exit.

> Considering that, would you advise another configuration?

If you don't want to run multiple instances:

Determine the point where running additional parallel queries does not increase overall SQL qp/s.
Set the upper bound of the SQL connection pool to be that limit.
Set the upper bound of the thread pool to be higher than that limit.

If during normal operation you find excessive numbers of packets being written to the detail file,
get a faster database.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140212/b727d9b0/attachment-0001.pgp>


More information about the Freeradius-Users mailing list