rlm_sql logging results
Hello, I am new-ish to freeradius, sort of stumped with resolving this - When a user goes to log on the logs start with Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Closing connection (131): Hit idle_timeout, was idle for 3600 seconds Mon Apr 11 02:41:33 2016 : Warning: rlm_sql (sql): You probably need to lower "min" Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Closing connection (132): Hit idle_timeout, was idle for 3600 seconds Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Opening additional connection (133), 1 of 32 pending slots used Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): 0 of 1 connections in use. Need more spares Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Opening additional connection (134), 1 of 31 pending slots used Mon Apr 11 02:41:33 2016 : Auth: (62) Login OK: [xxxxxx] (from client xxxxxxx port 0) now I have lowered min, I lowered it to several values including yet this still logs. I have tried more spares, more start/max servers, less servers, nothing I do seems to make this thing happy and my boss does not like seeing logs fill up with error type messages because he sees it as my failures, and rightly so I guess. My settings I think are related, and if I forgot some, please kindly ask and ye shall receive. radiusd.conf extract - start_servers = 5 max_servers = 32 min_spare_servers = 10 max_spare_servers = 15 max_requests_per_server = 0 auto_limit_acct = no from sql mod start = ${thread[pool].start_servers} # Minimum number of connections to keep open min = ${thread[pool].min_spare_servers} max = ${thread[pool].max_servers} spare = ${thread[pool].max_spare_servers} uses = 0 retry_delay = 30 lifetime = 0 idle_timeout = 90 We do not have a very busy radius, its for VPN and its rare everyone logs in at once, we have currently two access servers, but soon will have one on other states, so could be five in total by mid year. Are my radiusd,c.onf settings overkill and this is why the logs fill up with these errors? Would anyone have more suitable settings advice? Thank you. Lozza
On Apr 14, 2016, at 10:41 PM, Laura Steynes <laura.steynes72@gmail.com> wrote:
I am new-ish to freeradius, sort of stumped with resolving this -
When a user goes to log on the logs start with
Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Closing connection (131): Hit idle_timeout, was idle for 3600 seconds
If you don't want that message, change idle_timeout. Set it to zero so that idle connections are never closed.
Mon Apr 11 02:41:33 2016 : Warning: rlm_sql (sql): You probably need to lower "min" Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Closing connection (132): Hit idle_timeout, was idle for 3600 seconds Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Opening additional connection (133), 1 of 32 pending slots used Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): 0 of 1 connections in use. Need more spares Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Opening additional connection (134), 1 of 31 pending slots used
The rest of those messages are all a result of the bad setting for idle_timeout.
now I have lowered min, I lowered it to several values including yet this still logs. I have tried more spares, more start/max servers, less servers, nothing I do seems to make this thing happy and my boss does not like seeing logs fill up with error type messages because he sees it as my failures, and rightly so I guess.
Why not change idle_timeout?
Are my radiusd,c.onf settings overkill and this is why the logs fill up with these errors?
Because you set idle_timeout incorrectly. Juts set it to zero. Alan DeKok.
On Fri, Apr 15, 2016 at 10:01 PM, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 14, 2016, at 10:41 PM, Laura Steynes <laura.steynes72@gmail.com> wrote:
Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Closing connection (131): Hit idle_timeout, was idle for 3600 seconds
The rest of those messages are all a result of the bad setting for idle_timeout.
Why not change idle_timeout?
Are my radiusd,c.onf settings overkill and this is why the logs fill up with these errors?
Because you set idle_timeout incorrectly. Juts set it to zero.
OK, I have changed it to zero, however, since the default is set to 60, where as I used 90, does that not make teh default configuration " incorrect" as you put it? Thats solved that error thanks!, now i see - Sat Apr 16 10:59:00 2016 : Info: rlm_sql (sql): 0 of 5 connections in use. Need more spares Sat Apr 16 10:59:00 2016 : Info: rlm_sql (sql): Opening additional connection (5), 1 of 27 pending slots used is this normal, or based on my earlier post with settings something there need changing too? Thanks for your help!
I see now, it does not re-use any existing connections, each new user creates new spare, even if they are the only one authing, this keeps happening until max spares is reached, then it seems to re-use the connections, very strange indeed, since you recommend to silence previous "errors" we use no idle timeout which I presume would fix the new spares problem, and seems disconnecting again adds new spares, I suppose thats for accounting though. On Sat, Apr 16, 2016 at 11:00 AM, Laura Steynes <laura.steynes72@gmail.com> wrote:
On Fri, Apr 15, 2016 at 10:01 PM, Alan DeKok <aland@deployingradius.com> wrote:
On Apr 14, 2016, at 10:41 PM, Laura Steynes <laura.steynes72@gmail.com> wrote:
Mon Apr 11 02:41:33 2016 : Info: rlm_sql (sql): Closing connection
(131):
Hit idle_timeout, was idle for 3600 seconds
The rest of those messages are all a result of the bad setting for idle_timeout.
Why not change idle_timeout?
Are my radiusd,c.onf settings overkill and this is why the logs fill up with these errors?
Because you set idle_timeout incorrectly. Juts set it to zero.
OK, I have changed it to zero, however, since the default is set to 60, where as I used 90, does that not make teh default configuration " incorrect" as you put it?
Thats solved that error thanks!, now i see -
Sat Apr 16 10:59:00 2016 : Info: rlm_sql (sql): 0 of 5 connections in use. Need more spares Sat Apr 16 10:59:00 2016 : Info: rlm_sql (sql): Opening additional connection (5), 1 of 27 pending slots used
is this normal, or based on my earlier post with settings something there need changing too?
Thanks for your help!
On Apr 15, 2016, at 10:16 PM, Laura Steynes <laura.steynes72@gmail.com> wrote:
I see now, it does not re-use any existing connections, each new user creates new spare, even if they are the only one authing, this keeps happening until max spares is reached, then it seems to re-use the connections, very strange indeed,
That's not what's happening. When you set idle_timeout, the server closes idle connections. The rest of the "pool" configuration items work as documented.
since you recommend to silence previous "errors" we use no idle timeout which I presume would fix the new spares problem, and seems disconnecting again adds new spares, I suppose thats for accounting though.
Setting idle_timeout to zero means it won't close idle sessions. Again, this is all documented. Don't guess how the server works. Read the documentation. It's correct, and up to date. Alan DEKok.
participants (2)
-
Alan DeKok -
Laura Steynes