3.0 SQL pooling question

Arran Cudbard-Bell a.cudbardb at freeradius.org
Fri Jun 14 13:12:59 CEST 2013

On 14 Jun 2013, at 11:55, Phil Mayers <p.mayers at IMPERIAL.AC.UK> wrote:

> In 3.0, is there a way to consider a SQL connection dead if it returns a certain class of errors, then close and re-open it?

The drivers can return SQL_DOWN, which should result in a new connection being established or an existing connection being reserved in the pool and the query being retried.

The current behaviour is to cycle through all connections before giving up. So if the database is down, all the connections are closed, and you don't have queries randomly failing once the database comes back up because of stale connection handles.

I'm not sure this is the right behaviour, but it seems to work best for simulated failures.

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

More information about the Freeradius-Devel mailing list