Posted: Tue Oct 17, 2006 5:46 pm Post subject: [asterisk-dev] Asterisk Open File Limit
Hello,
What is the default open file limit in Asterisk and where is it defined?
I am testing a very high capacity Asterisk server and I am running
into a lot of these types of errors that I have:
Oct 17 12:14:23 ERROR[28770]: cdr_csv.c:237 csv_log: Unable to re-open
master file /var/log/asterisk//cdr-csv//Master.csv : Too many open
files
Oct 17 12:14:19 WARNING[28630]: res_agi.c:247 launch_script: Unable to
create toast pipe: Too many open files
doing a /proc/sys/fs/file-nr shows me that I never seem to have many
more than 2200 files open so I don't think this is a Linux issue
specifically since that limit is set to over 300000.
Any info would be greatly appreciated.
Thanks,
MATT---
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Tue Oct 17, 2006 7:31 pm Post subject: [asterisk-dev] Asterisk Open File Limit
----- Matt Florell <astmattf@gmail.com> wrote:
Quote:
What is the default open file limit in Asterisk and where is it
defined?
Asterisk has no open file limit. There is no code in Asterisk to track how many files are open.
Quote:
doing a /proc/sys/fs/file-nr shows me that I never seem to have many
more than 2200 files open so I don't think this is a Linux issue
specifically since that limit is set to over 300000.
And what does 'ulimit -n' say for your Asterisk process?
--
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Tue Oct 17, 2006 7:53 pm Post subject: [asterisk-dev] Asterisk Open File Limit
Matt Florell wrote:
Quote:
Hello,
What is the default open file limit in Asterisk and where is it defined?
I am testing a very high capacity Asterisk server and I am running
into a lot of these types of errors that I have:
Oct 17 12:14:23 ERROR[28770]: cdr_csv.c:237 csv_log: Unable to re-open
master file /var/log/asterisk//cdr-csv//Master.csv : Too many open
files
Oct 17 12:14:19 WARNING[28630]: res_agi.c:247 launch_script: Unable to
create toast pipe: Too many open files
doing a /proc/sys/fs/file-nr shows me that I never seem to have many
more than 2200 files open so I don't think this is a Linux issue
specifically since that limit is set to over 300000.
Any info would be greatly appreciated.
Thanks,
MATT---
matt, look in /proc/sys/fs/
you should see various files one of which is 'file-max'
that would be the first place i would try.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Tue Oct 17, 2006 7:59 pm Post subject: [asterisk-dev] Asterisk Open File Limit
*snipped
Quote:
doing a /proc/sys/fs/file-nr shows me that I never seem to have many
more than 2200 files open so I don't think this is a Linux issue
specifically since that limit is set to over 300000.
*snipped
obviously you already know where to look, and i need more coffee.
sorry for the wasted bw.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Tue Oct 17, 2006 8:17 pm Post subject: [asterisk-dev] Asterisk Open File Limit
On Tue, 2006-10-17 at 12:24 -0400, Matt Florell wrote:
Quote:
Hello,
What is the default open file limit in Asterisk and where is it defined?
That is a OS tunable parameter not Asterisk. Consult your shell that you
start asterisk from and possibly the OS itself.
--
Steven <critch@basesys.com>
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Tue Oct 17, 2006 10:59 pm Post subject: [asterisk-dev] Asterisk Open File Limit
Thanks,
ulimit was the problem. The manpage for ulimit and almost everywhere I
searched for information on ulimit in Linux 2.6 says it's depricated
and not used anymore, also it does not show any options. I eventually
found a Linux 2.0 ulimit manpage from 1998 that showed what the
options for ulimit really are and I was able to raise ulimit to 4096
and now no more too many file open errors.
I just did a "ulimit -n 4096" then "ulimit -a" to check the settings
and everything is happy now.
Now I'm pushing 600 concurrent channels on this server through meetme
with 200-300 calls per minute(Dial and Hangup) with only the
occasional "Avoided deadlock for '0x871ef90', 10 retries" message.
Thanks,
MATT---
On 10/17/06, Kevin P. Fleming <kpfleming@digium.com> wrote:
Quote:
----- Matt Florell <astmattf@gmail.com> wrote:
> What is the default open file limit in Asterisk and where is it
> defined?
Asterisk has no open file limit. There is no code in Asterisk to track how many files are open.
> doing a /proc/sys/fs/file-nr shows me that I never seem to have many
> more than 2200 files open so I don't think this is a Linux issue
> specifically since that limit is set to over 300000.
And what does 'ulimit -n' say for your Asterisk process?
--
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Tue Oct 17, 2006 11:57 pm Post subject: [asterisk-dev] Asterisk Open File Limit
Matt Florell wrote:
Quote:
What is the default open file limit in Asterisk and where is it defined?
Matt,
You need to change the maximum number of open file descriptors available
to a process via ulimit. I make all ulimit changes in the init script
AND limits.conf. That way they're applied in both of the following
scenarios:
1) Asterisk is started automatically at boot.
2) Asterisk is started manually from a login prompt after a crash or
maintenance downtime.
Increasing the maximum number of file descriptors can be done by adding
the following lines to limits.conf (where <user> is the user you run
Asterisk as):
<user> soft nofile 65536
<user> hard nofile 65536
And adding the following line to Asterisk's init script (in your case
'start_asterisk_boot.pl'), immediately prior to starting Asterisk itself:
ulimit -n 65536
I've solved a good number of Asterisk scalability issues, so feel free
to contact me off-list if you run into any more.
Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Wed Oct 18, 2006 12:52 am Post subject: [asterisk-dev] Asterisk Open File Limit
Thanks for the notes. I'm more used to the
use-lots-of-cheap-servers-in-a-cluster approach and never had to deal
the issues of a large monolithic server in an Asterisk scenario
before.
As for the limit of 65536, does it every really go anywhere near that
high for you? I had 600 Asterisk channels with hundreds of AGI and
manager calls happening and I never broke 3600.
MATT---
On 10/17/06, Matthew J. Roth <mroth@imminc.com> wrote:
Quote:
Matt Florell wrote:
> What is the default open file limit in Asterisk and where is it defined?
Matt,
You need to change the maximum number of open file descriptors available
to a process via ulimit. I make all ulimit changes in the init script
AND limits.conf. That way they're applied in both of the following
scenarios:
1) Asterisk is started automatically at boot.
2) Asterisk is started manually from a login prompt after a crash or
maintenance downtime.
Increasing the maximum number of file descriptors can be done by adding
the following lines to limits.conf (where <user> is the user you run
Asterisk as):
<user> soft nofile 65536
<user> hard nofile 65536
And adding the following line to Asterisk's init script (in your case
'start_asterisk_boot.pl'), immediately prior to starting Asterisk itself:
ulimit -n 65536
I've solved a good number of Asterisk scalability issues, so feel free
to contact me off-list if you run into any more.
Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Wed Oct 18, 2006 5:25 am Post subject: [asterisk-dev] Asterisk Open File Limit
On Tue, Oct 17, 2006 at 05:09:51PM -0400, Matt Florell wrote:
Quote:
ulimit was the problem. The manpage for ulimit and almost everywhere I
searched for information on ulimit in Linux 2.6 says it's depricated
and not used anymore, also it does not show any options.
man bash
(The standalone ulimit command is no longer used because almost all shells
have this command as a built-in function)
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Wed Oct 18, 2006 9:44 am Post subject: [asterisk-dev] Asterisk Open File Limit
On Tuesday, 17 בOctober 2006 23:09, Matt Florell wrote:
Quote:
... The manpage for ulimit and almost everywhere I searched for
information on ulimit in Linux 2.6 says it's depricated and not
used anymore, ...
I just did a "ulimit -n 4096" then "ulimit -a"
I think you mixed two types ulimit:
1. The ulimit(1) command is not deprecated at all -- Linux normally
don't carry a separate man page for it since it's implemented as a
built-in command in bash(1).
Just search in bash info page and you'll see it live as ever.
2. The library function ulimit(3) is indeed deprecated in glibc and
its man page point you the the standard replacements --
The system calls getrlimit(2) and setrlimit(2).
Reality must take precedence over public relations, for Mother
Nature cannot be fooled. -- R.P. Feynman
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Wed Oct 18, 2006 1:33 pm Post subject: [asterisk-dev] Asterisk Open File Limit
I've written a patch, http://bugs.digium.com/view.php?id=7499, that
allows setting this in asterisk.conf. It is, however, not included in
trunk/beta/something, but if we're lucky, someone might let it
through anyway. it doesn't change much, and it certainly doesn't
break anything, so IMHO it should be included.
roy
On 17. okt. 2006, at 18.24, Matt Florell wrote:
Quote:
Hello,
What is the default open file limit in Asterisk and where is it
defined?
I am testing a very high capacity Asterisk server and I am running
into a lot of these types of errors that I have:
Oct 17 12:14:23 ERROR[28770]: cdr_csv.c:237 csv_log: Unable to re-open
master file /var/log/asterisk//cdr-csv//Master.csv : Too many open
files
Oct 17 12:14:19 WARNING[28630]: res_agi.c:247 launch_script: Unable to
create toast pipe: Too many open files
doing a /proc/sys/fs/file-nr shows me that I never seem to have many
more than 2200 files open so I don't think this is a Linux issue
specifically since that limit is set to over 300000.
Any info would be greatly appreciated.
Thanks,
MATT---
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Wed Oct 18, 2006 3:07 pm Post subject: [asterisk-dev] Asterisk Open File Limit
On Wed, 18 Oct 2006, Roy Sigurd Karlsbakk wrote:
Quote:
I've written a patch, http://bugs.digium.com/view.php?id=7499, that
allows setting this in asterisk.conf. It is, however, not included in
trunk/beta/something, but if we're lucky, someone might let it
through anyway. it doesn't change much, and it certainly doesn't
break anything, so IMHO it should be included.
Well, technically, it is a new feature. I'm pretty sure that Trunk is in
feature freeze mode.
You mentioned that it also is set when you run "asterisk -r". While I
cannot immediately see why that would be a problem, can you think of any
situations where that would be detrimental?
--
Vice President of N2Net, a New Age Consulting Service, Inc. Company
http://www.n2net.net Where everything clicks into place!
KP-216-121-ST
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Wed Oct 18, 2006 6:49 pm Post subject: [asterisk-dev] Asterisk Open File Limit
On Wednesday 18 October 2006 09:31, Greg Boehnlein wrote:
Quote:
On Wed, 18 Oct 2006, Roy Sigurd Karlsbakk wrote:
> I've written a patch, http://bugs.digium.com/view.php?id=7499, that
> allows setting this in asterisk.conf. It is, however, not included
> in trunk/beta/something, but if we're lucky, someone might let it
> through anyway. it doesn't change much, and it certainly doesn't
> break anything, so IMHO it should be included.
Well, technically, it is a new feature. I'm pretty sure that Trunk is
in feature freeze mode.
1.4 has already been branched, and there is a new command in trunk
called, appropriately enough, ulimit, which will allow you to examine
and increase the limits appropriately, without restarting Asterisk.
Quote:
You mentioned that it also is set when you run "asterisk -r". While I
cannot immediately see why that would be a problem, can you think of
any situations where that would be detrimental?
If the system had subsequently set the limits higher, then resetting the
limit upon reconnect would suck.
--
Tilghman
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Posted: Sun Oct 22, 2006 8:09 pm Post subject: [asterisk-dev] Asterisk Open File Limit
Quote:
> Well, technically, it is a new feature. I'm pretty sure that Trunk is
> in
> feature freeze mode.
No, there is a branch for Asterisk 1.4 already, so trunk is open
for all kinds of changes.
This patch was submitted half a year or so before 1.4 alpha was
released. It is quite clear that Digium does not want anything handy
in there unless The Good Guys Submit The Code
roy
--
Roy Sigurd Karlsbakk
roy@karlsbakk.net
-------------------------------
MICROSOFT: Acronym for "Most Intelligent Customers Realise Our
Software Only Fools Teenagers"
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum