Hi Guys, I am having below logs in my radius.log file. The connections are getting closed and some it suddenly got utilized and radius spawns new connections and it takes time to spawn. Also connections are getting closed even the idle timeout isn't reached. Please advise. Below are the logs. Mon Dec 7 12:11:06 2020 : Info: Ready to process requests Mon Dec 7 12:11:31 2020 : Warning: rlm_sql (sql): 22 of 22 connections in use. You probably need to increase "spare" Mon Dec 7 12:11:31 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 12:11:31 2020 : Warning: rlm_sql (sql): 23 of 23 connections in use. You probably need to increase "spare" Mon Dec 7 12:11:31 2020 : Info: rlm_sql (sql): Opening additional connection (23) Mon Dec 7 12:11:31 2020 : Warning: rlm_sql (sql): 23 of 23 connections in use. You probably need to increase "spare" Mon Dec 7 12:11:31 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 12:11:52 2020 : Warning: rlm_sql (sql): 24 of 24 connections in use. You probably need to increase "spare" Mon Dec 7 12:11:52 2020 : Info: rlm_sql (sql): Opening additional connection (24) Mon Dec 7 12:13:31 2020 : Info: rlm_sql (sql): Closing connection (15), from 19 unused connections Mon Dec 7 12:13:46 2020 : Info: rlm_sql (sql): Closing connection (27), from 18 unused connections Mon Dec 7 12:13:53 2020 : Info: rlm_sql (sql): Closing connection (4), from 17 unused connections Mon Dec 7 12:13:56 2020 : Info: rlm_sql (sql): Closing connection (21), from 16 unused connections Mon Dec 7 12:13:57 2020 : Info: rlm_sql (sql): Closing connection (2), from 15 unused connections Mon Dec 7 12:13:58 2020 : Info: rlm_sql (sql): Closing connection (12), from 14 unused connections Mon Dec 7 12:13:59 2020 : Info: rlm_sql (sql): Closing connection (13), from 13 unused connections Mon Dec 7 12:14:00 2020 : Info: rlm_sql (sql): Closing connection (29), from 12 unused connections Mon Dec 7 12:14:01 2020 : Info: rlm_sql (sql): Closing connection (18), from 9 unused connections Mon Dec 7 12:14:02 2020 : Info: rlm_sql (sql): Closing connection (36), from 10 unused connections Mon Dec 7 12:14:03 2020 : Info: rlm_sql (sql): Closing connection (33), from 9 unused connections Mon Dec 7 12:14:04 2020 : Info: rlm_sql (sql): Closing connection (17), from 8 unused connections Mon Dec 7 12:14:05 2020 : Info: rlm_sql (sql): Closing connection (23), from 7 unused connections Mon Dec 7 12:14:06 2020 : Info: rlm_sql (sql): Closing connection (8), from 6 unused connections Mon Dec 7 12:14:07 2020 : Info: rlm_sql (sql): Closing connection (37), from 5 unused connections Mon Dec 7 12:14:08 2020 : Info: rlm_sql (sql): Closing connection (35), from 3 unused connections Mon Dec 7 12:14:09 2020 : Info: rlm_sql (sql): Closing connection (14), from 3 unused connections Mon Dec 7 12:14:10 2020 : Info: rlm_sql (sql): Closing connection (31), from 2 unused connections Mon Dec 7 12:14:11 2020 : Info: rlm_sql (sql): Closing connection (11), from 1 unused connections Mon Dec 7 12:14:20 2020 : Warning: rlm_sql (sql): 20 of 20 connections in use. You probably need to increase "spare" Mon Dec 7 12:14:20 2020 : Info: rlm_sql (sql): Opening additional connection (40) Mon Dec 7 12:14:20 2020 : Warning: rlm_sql (sql): 20 of 20 connections in use. You probably need to increase "spare" Mon Dec 7 12:14:20 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 12:14:20 2020 : Warning: rlm_sql (sql): 20 of 20 connections in use. You probably need to increase "spare" Mon Dec 7 12:14:20 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 12:14:20 2020 : Warning: rlm_sql (sql): 21 of 21 connections in use. You probably need to increase "spare" Mon Dec 7 12:14:20 2020 : Info: rlm_sql (sql): Opening additional connection (41) Mon Dec 7 12:14:20 2020 : Warning: rlm_sql (sql): 21 of 21 connections in use. You probably need to increase "spare" Mon Dec 7 12:14:20 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 12:14:20 2020 : Warning: rlm_sql (sql): 22 of 22 connections in use. You probably need to increase "spare" Mon Dec 7 12:14:20 2020 : Info: rlm_sql (sql): Opening additional connection (42) Below are my sql config of radius. sql { driver = "rlm_sql_mysql" dialect = "mysql" server = "localhost" port = 3306 login = "nbbdb" radius_db = "nbbdb" acct_table1 = "radacct" acct_table2 = "radacct" postauth_table = "radpostauth" authcheck_table = "radcheck" groupcheck_table = "radgroupcheck" authreply_table = "radreply" groupreply_table = "radgroupreply" usergroup_table = "radusergroup" delete_stale_sessions = yes pool { min = 20 max = ${thread[pool].max_servers} spare = 20 uses = 0 lifetime = 0 idle_timeout = 900 } client_table = "nas" $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf } --
hi, what version are you using? If you are able to keeplong-lived sessions to yourDB (and there isnt a firewall playing games between your server and the DB) then why are you idling out the connections at all? set idle_timeout to 0 and the connections will be kept and you wont have this close/reconnect issue anyway) . do you need 20 spare connections? looks like they arent being used....you're currently spinning up more than you need. alan
Hi Alan, I am using FR 3.0.4. I have changed the idle_timeout to zero. Let me monitor things and will share you the feedback. Ammad On 12/7/2020 1:47 PM, Alan Buxey wrote:
what version are you using?
If you are able to keeplong-lived sessions to yourDB (and there isnt a firewall playing games between your server and the DB) then why are you idling out the connections at all? set idle_timeout to 0 and the connections will be kept and you wont have this close/reconnect issue anyway) . do you need 20 spare connections? looks like they arent being used....you're currently spinning up more than you need.
After changing I am still having connections spawning and connections are getting closed. Need your advise. Mon Dec 7 17:01:09 2020 : Info: Loaded virtual server inner-tunnel Mon Dec 7 17:01:09 2020 : Info: Loaded virtual server status Mon Dec 7 17:01:09 2020 : Info: Ready to process requests Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 50 of 50 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Info: rlm_sql (sql): Opening additional connection (50) Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 50 of 50 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 50 of 50 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 51 of 51 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Info: rlm_sql (sql): Opening additional connection (51) Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 51 of 51 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 52 of 52 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Info: rlm_sql (sql): Opening additional connection (52) Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 52 of 52 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 53 of 53 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Info: rlm_sql (sql): Opening additional connection (53) Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 53 of 53 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 53 of 53 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 54 of 54 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Info: rlm_sql (sql): Opening additional connection (54) Mon Dec 7 17:06:35 2020 : Warning: rlm_sql (sql): 54 of 54 connections in use. You probably need to increase "spare" Mon Dec 7 17:06:35 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:06:53 2020 : Info: rlm_sql (sql): 6 of 55 connections in use. Need more spares Mon Dec 7 17:06:53 2020 : Info: rlm_sql (sql): Opening additional connection (55) Mon Dec 7 17:06:53 2020 : Info: rlm_sql (sql): 6 of 55 connections in use. Need more spares Mon Dec 7 17:06:53 2020 : Error: rlm_sql (sql): Cannot open new connection, connection spawning already in progress Mon Dec 7 17:07:23 2020 : Info: rlm_sql (sql): Closing connection (29), from 6 unused connections Mon Dec 7 17:07:38 2020 : Info: rlm_sql (sql): Closing connection (5), from 4 unused connections Mon Dec 7 17:07:45 2020 : Info: rlm_sql (sql): Closing connection (27), from 4 unused connections Mon Dec 7 17:07:48 2020 : Info: rlm_sql (sql): Closing connection (36), from 3 unused connections Mon Dec 7 17:07:49 2020 : Info: rlm_sql (sql): Closing connection (19), from 2 unused connections Mon Dec 7 17:07:51 2020 : Info: rlm_sql (sql): Closing connection (11), from 1 unused connections On 12/7/2020 5:03 PM, Ammad Ali wrote:
Hi Alan,
I am using FR 3.0.4. I have changed the idle_timeout to zero. Let me monitor things and will share you the feedback.
Ammad On 12/7/2020 1:47 PM, Alan Buxey wrote:
what version are you using?
If you are able to keeplong-lived sessions to yourDB (and there isnt a firewall playing games between your server and the DB) then why are you idling out the connections at all? set idle_timeout to 0 and the connections will be kept and you wont have this close/reconnect issue anyway) . do you need 20 spare connections? looks like they arent being used....you're currently spinning up more than you need.
participants (2)
-
Alan Buxey -
Ammad Ali