The idea behind was that writing to a file is cheeper than perform a DB transactions and a delayed (asynchronous) write to DB is not an issue for me. My average row lock time is about 40ms in bussy hour. IMHO writing to a file must be faster or am I wrong?
Yes. The detail reader is not doing multiple inserts per transaction. It does a single insert per transaction, the same as if you'd inserted the row at the time the packet was received. There is no advantage to using a detail/reader writer, unless you want to guarantee inserts happen in serial for some reason, or need to spool requests to disk if the database goes down. If you want to do bulk inserts you use the sql_log and the 'null' driver to record the statements that would have been executed. Then you execute them as a batch job in a single transaction using a shell script and a cron job.
You can set the MySQL client library timeout sufficiently low that the module will will trash all its connections, and failover to the detail writer before the server starts dropping packets.
What config parameter is it? I am affraid that if I lock the raddact table for 3-5 sec or so because of another transaction the server will start to drop requests before it will have a chance to failover to a file...
sql { query_timeout = n } I think the minimum timeout is 2. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2