FR behavior when DB not available
Anatoliy
cphlpd at gmail.com
Tue Jul 18 04:39:16 UTC 2023
Hi Nick , thank you.
On Mon, Jul 17, 2023 at 5:07 PM Nick Porter <nick at portercomputing.co.uk>
wrote:
>
> On 17/07/2023 03:22, Anatoliy wrote:
> > So sql query always block core thread, and only option is to find way for
> > faster detect that tcp session to DB fails ? For example max_retries
> option
> > introduced in 3.2.3.
>
> The max_retries option was added to prevent every possible connection
> being tried when a query fails - so it does improve the speed of
> detecting failures.
>
> With MySQL / MariaDB as the database you also want to look at the
> query_timeout option. Not all the database client libraries support
> setting a timeout, but the MySQL client does.
>
> > But I think that retry_delay option should prevent all threads from
> > connecting to DB for some time, if previous connection is fails. And
> these
> > messages tells about this , or my understanding is wrong ? Increasing
> > retry_delay should help faster reply to NAS with Access-Accept.
> retry_delay puts a delay on attempting to bring up new database
> connections if the previous attempt failed. It is a balancing act
> between persistently attempting to bring up new connections when
> something is wrong, and just saying "this didn't work last time, we're
> going to wait a while before we try again", which can cause a slower
> recovery when the database is available again.
>
> --
> Nick Porter
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
More information about the Freeradius-Users
mailing list