Freeradius 3.0.8 Can't create UNIX socket and Too many open files
Hello, I am playing with 3.0.8 version processing just Accounting Requests.The goal is get over more than 1.600 req/s. Up to 1000/req it is fine. MySQL DB has max_connections = 2048. It can run for half of a day and then it crashes accidentally: Tue Apr 28 12:52:06 2015 : Info: rlm_sql (sql_instance_mobile_direct): 665 of 696 connections in use. Need more spares Tue Apr 28 12:52:06 2015 : Info: rlm_sql (sql_instance_mobile_direct): Opening additional connection (1645), 192 of 304 pending slots used Tue Apr 28 12:52:06 2015 : Error: rlm_sql_mysql: Couldn't connect to MySQL server radius@localhost:gprscalls Tue Apr 28 12:52:06 2015 : Error: rlm_sql_mysql: MySQL error: Can't create UNIX socket (24) Tue Apr 28 12:52:06 2015 : Error: rlm_sql (sql_instance_mobile_direct): Opening connection failed (1624) Tue Apr 28 12:52:06 2015 : Error: rlm_sql_mysql: Couldn't connect to MySQL server radius@localhost:gprscalls Tue Apr 28 12:52:06 2015 : Error: rlm_sql_mysql: MySQL error: Can't create UNIX socket (24) and later on in the log: Tue Apr 28 12:52:06 2015 : ERROR: (1086382) detail.mobile: ERROR: Couldn't open file /var/log/freeradius/radacct/detail.mobile/queue-11/detail-2015042812: Failed calling dup(): Too many open files Tue Apr 28 12:52:06 2015 : ERROR: (1086380) detail.mobile: ERROR: Couldn't open file /var/log/freeradius/radacct/detail.mobile/queue-9/detail-2015042812: Failed calling dup(): Too many open files Tue Apr 28 12:52:06 2015 : ERROR: (1086383) detail.mobile: ERROR: Couldn't open file /var/log/freeradius/radacct/detail.mobile/queue-9/detail-2015042812: Failed to open file /var/log/freeradius/radacct/detail.mobile/queue-9/detail-2015042812: Too many open files Config: listen { ipaddr = * port = 1813 type = acct limit { } } preacct { preprocess acct_unique_mobile } accounting { redundant { sql_instance_mobile_direct group { linelog detail.mobile } } if (noop) { ok } } } sql sql_instance_mobile_direct { query_timeout = 1 driver = "rlm_sql_mysql" dialect = "mysql" server = "localhost" port = 3306 login = "radius" password = "xxxxxxxxxxx" radius_db = "gprscalls" 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 logfile = ${logdir}/sqllog_dslres.sql pool { start = 200 min = 20 max = ${thread[pool].max_servers} spare = 80 uses = 0 lifetime = 0 idle_timeout = 120 } client_table = "nas" $INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries_mobile.conf } It is a test system so far. I can provide all debugs if needed. Thanks Ales
On Apr 28, 2015, at 7:29 AM, Aleš Rygl <ales@rygl.net> wrote:
I am playing with 3.0.8 version processing just Accounting Requests.The goal is get over more than 1.600 req/s. Up to 1000/req it is fine. MySQL DB has max_connections = 2048. It can run for half of a day and then it crashes accidentally:
It doesn't crash... it just says it can't open more files. Are you sure the system doesn't have file descriptor limitations in place? http://askubuntu.com/questions/162229/how-do-i-increase-the-open-files-limit...
ERROR: (1086380) detail.mobile: ERROR: Couldn't open file /var/log/freeradius/radacct/detail.mobile/queue-9/detail-2015042812: Failed calling dup(): Too many open files
That's an error returned by the OS, not by FreeRADIUS. Fix your OS so that it allows FreeRADIUS to have more than 2048 files open. Alan DeKok.
Hello Alan, you were right of course. Would it make sense to modify Debian startup script to raise the default value of 2048? Regards Ales
On Apr 28, 2015, at 10:06 AM, Aleš Rygl <ales@rygl.net> wrote:
you were right of course. Would it make sense to modify Debian startup script to raise the default value of 2048?
You're pretty much the only person running into this issue. So you should make the modifications locally. If you need 2048 database connections, I have to suspect that you're going something wrong. I've seen systems do sustained loads of 1000's of packets/s with less than 100 database connections. Alan DeKok.
participants (2)
-
Alan DeKok -
Aleš Rygl