FR3 DB connection code....

Arran Cudbard-Bell a.cudbardb at freeradius.org
Sat Dec 8 11:55:38 CET 2012


> 
> ....so why is the connection SQL count going over 20 ?

Because connection number identifies a unique connection, not a slot in the pool. Connection numbers are monotonically increasing. The resason why you're getting connection churn is because idle_timeout is set to 60, and one of your connections has been idle for more than 60 seconds, so it's closed. The 'spare' code then kicks in and opens a new connection to maintain the number of spare connections in the pool.

You could set spare to 0 and then use a longer idle_timeout, then the pool would actually find the right number of connections to use instead of churning over the ones it's forced to keep open with spare. Course that might cause interesting issues on accounting spikes :)

Anyway have you seen actual segfaults/crashy things, or were just concerned by the connection pool behaviour?

-Arran


More information about the Freeradius-Devel mailing list