Discussion:
fopen problem with Freeradius
Yasser Ahmed Hosny
2003-07-14 06:21:20 UTC
Permalink
Dear All,

I am running Freeradius Ver. 0.8.1 on a Sun Solaris machince Ver. 8 and
connecting to 4 Oracle Databases (different machines) for Authentication
and Accounting (along with Fail-over).
My setup is as follows:
100 connections for Primary Authentication.
100 connections for Secondary Authentication.
100 connections for Primary Accounting.
100 connections for Secondary Accounting.
Once I start the Freeradius process, I can open only 253 connections out
of 400 and I got the following error:

Mon Jul 14 08:39:16 2003 : Error: Failed creating PID file
/usr/local/var/run/radiusd/radiusd.pid: Too many open files

And the process did not start.

I've tried to change some system parameters, but I've realized that I
can only change the parameter controlling the "open" files and not
"fopen", which is used by Freeradius.

I'll appreciate your help in advance.

Regards
------------------------------------------------------------------------
-------------------
Yasser Ahmed Hosny



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alex Gutaga
2003-07-14 08:25:11 UTC
Permalink
Post by Yasser Ahmed Hosny
Dear All,
I am running Freeradius Ver. 0.8.1 on a Sun Solaris machince Ver. 8 and
connecting to 4 Oracle Databases (different machines) for Authentication
and Accounting (along with Fail-over).
100 connections for Primary Authentication.
100 connections for Secondary Authentication.
100 connections for Primary Accounting.
100 connections for Secondary Accounting.
Once I start the Freeradius process, I can open only 253 connections out
Mon Jul 14 08:39:16 2003 : Error: Failed creating PID file
/usr/local/var/run/radiusd/radiusd.pid: Too many open files
And the process did not start.
I've tried to change some system parameters, but I've realized that I
can only change the parameter controlling the "open" files and not
"fopen", which is used by Freeradius.
I'll appreciate your help in advance.
Regards
Hi

If you change /etc/system using the following..

set rlim_fd_cur=2048 - default size
set rlim_fd_max=8192 - max size (by anyone other than root)

and reboot it may change it without a recompile.

i have got source from:
http://groups.google.com/groups?q=MAX_OPEN+solaris+/etc/system&hl=en&lr=&ie=UTF-8&selm=38FAEB73.FA784A21%40totalise.co.uk&rnum=1

Def


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alex Gutaga
2003-07-14 08:46:13 UTC
Permalink
Post by Yasser Ahmed Hosny
Dear All,
I am running Freeradius Ver. 0.8.1 on a Sun Solaris machince Ver. 8 and
connecting to 4 Oracle Databases (different machines) for Authentication
and Accounting (along with Fail-over).
100 connections for Primary Authentication.
100 connections for Secondary Authentication.
100 connections for Primary Accounting.
100 connections for Secondary Accounting.
Once I start the Freeradius process, I can open only 253 connections out
Mon Jul 14 08:39:16 2003 : Error: Failed creating PID file
/usr/local/var/run/radiusd/radiusd.pid: Too many open files
And the process did not start.
I've tried to change some system parameters, but I've realized that I
can only change the parameter controlling the "open" files and not
"fopen", which is used by Freeradius.
I'll appreciate your help in advance.
Regards
The various Unix platforms all have limits on the number of files that can be
open in a single process at one time. For busy sites, increase that number to
1024.

modify on Solaris: in /etc/system, set rlim_fd_max, and reboot.

for more details:
http://docs.sun.com/source/816-5679-10/estune.htm#1019260

Regards
Def


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alan DeKok
2003-07-14 13:44:28 UTC
Permalink
Post by Yasser Ahmed Hosny
I am running Freeradius Ver. 0.8.1 on a Sun Solaris machince Ver. 8 and
connecting to 4 Oracle Databases (different machines) for Authentication
and Accounting (along with Fail-over).
That's a little bit of overkill, I think. Why not just have one
database for authentication & accounting, and another for failover?

You can then use Oracle's tools to do database replication, if you
want the data on more machines.
Post by Yasser Ahmed Hosny
100 connections for Primary Authentication.
100 connections for Secondary Authentication.
100 connections for Primary Accounting.
100 connections for Secondary Accounting.
Wow... are you expecting to get 10's of 1000's of queries a second,
or are you expecting that Oracle will be very slow? I don't see any
reason to have so many open connections.

Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Yasser Ahmed Hosny
2003-07-15 07:37:28 UTC
Permalink
Thanks for the reply.

I've increased the two parameters, but I am still getting the fopen()
limitation for 256 files and I cannot open any new files and the Process
do not start.

I need to clarify my whole setup.

First I have around 500.000 dialup users that will use my setup and I
have around 60 NAS servers (Different brands). Also, it is important to
mention that I am running 6 RADIUS servers distributed in two locations
(3 in location A and 3 in location B). The whole purpose behind this
setup is that any location can handle the whole traffic in case the
other Location fails. We expect to have around 80 to 100 calls per
second for the whole setup, so that's why we've come up with these
numbers of DB connections below.

As an answer to the slowness of the DB, I am not expecting this to
happen. We have well structured and indexed Oracle DB working at the
backend.

My question is, did anyone run with such setup before, and how he/she
overcame this opening file limitation, also, how it is performing?


Regards
------------------------------------------------------------------------
----Yasser Ahmed Hosny

Dear All,

I am running Freeradius Ver. 0.8.1 on a Sun Solaris machince Ver. 8 and
connecting to 4 Oracle Databases (different machines) for Authentication
and Accounting (along with Fail-over).
My setup is as follows:
100 connections for Primary Authentication.
100 connections for Secondary Authentication.
100 connections for Primary Accounting.
100 connections for Secondary Accounting.
Once I start the Freeradius process, I can open only 253 connections out
of 400 and I got the following error:

Mon Jul 14 08:39:16 2003 : Error: Failed creating PID file
/usr/local/var/run/radiusd/radiusd.pid: Too many open files

And the process did not start.

I've tried to change some system parameters, but I've realized that I
can only change the parameter controlling the "open" files and not
"fopen", which is used by Freeradius.

I'll appreciate your help in advance.

Regards
------------------------------------------------------------------------
-------------------
Yasser Ahmed Hosny



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alan DeKok
2003-07-15 14:34:03 UTC
Permalink
We expect to have around 80 to 100 calls per second for the whole
setup, so that's why we've come up with these numbers of DB
connections below.
You need 100 SQL connections ONLY if each SQL query takes one entire
second to process. That's just not true.

Each SQL query probably takes ~1/10 of a second, at which point you
only need 10 SQL connections to handle 100 request per second.

Drop the number of connections to something reasonable, like 20, and
you will have NO problems.

Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Continue reading on narkive:
Loading...