<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Olivier,<br>
<br>
you have to edit /etc/security/limits.conf. Take a look at "man
limits.conf".<br>
<br>
Some users also modify the Asterisk-Start-Script. You can insert an
"ulimit -n 8192" in the "Start-Case". <br>
<br>
Best regard<br>
-Thorsten-<br>
<br>
<div class="moz-cite-prefix">Am 15.02.2013 18:48, schrieb Olivier:<br>
</div>
<blockquote
cite="mid:CAPeT9jhLqqcuSw0PsAVgKNzuybfpno5FLbVgj5TT7uMOd-+pNA@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">2013/2/15 Olivier <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:oza_4h07@yahoo.fr"
target="_blank">oza_4h07@yahoo.fr</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
On a production system, I'm seeing this:<br>
[Feb 13 16:47:00] WARNING[14742] res_agi.c: Unable to create
toast pipe: Too many open files<br>
[Feb 13 16:47:00] WARNING[9283] acl.c: Cannot create socket<br>
[Feb 13 16:47:00] WARNING[9283] rtp.c: Unable to allocate RTCP
socket: Too many open files<br>
[Feb 13 16:47:00] WARNING[14732] acl.c: Cannot create socket<br>
[Feb 13 16:47:00] WARNING[14732] channel.c: Channel allocation
failed: Can't create alert pipe! Try increasing max file
descriptors with ulimit -n<br>
[Feb 13 16:47:00] WARNING[14732] chan_sip.c: Unable to
allocate AST channel structure for SIP channel<br>
[Feb 13 16:47:00] WARNING[14732] app_dial.c: Unable to create
channel of type 'SIP' (cause 0 - Unknown)<br>
[Feb 13 16:47:00] ERROR[14732] rtp.c: Unable to allocate
socket: Too many open files<br>
<br>
<br>
Typing ulimit -a, shows :<br>
# ulimit -a<br>
core file size (blocks, -c) 0<br>
data seg size (kbytes, -d) unlimited<br>
scheduling priority (-e) 0<br>
file size (blocks, -f) unlimited<br>
pending signals (-i) 16382<br>
max locked memory (kbytes, -l) 64<br>
max memory size (kbytes, -m) unlimited<br>
open files (-n) 1024<br>
pipe size (512 bytes, -p) 8<br>
POSIX message queues (bytes, -q) 819200<br>
real-time priority (-r) 0<br>
stack size (kbytes, -s) 8192<br>
cpu time (seconds, -t) unlimited<br>
max user processes (-u) unlimited<br>
virtual memory (kbytes, -v) unlimited<br>
file locks (-x) unlimited<br>
<br>
<br>
So it seems that increasing this open files limit from 1024 to
2048 could work around the above issue.<br>
<br>
Strangely, I can't find much online doc on ulimit and its
usage.<br>
My main source is <a moz-do-not-send="true"
href="http://ss64.com/bash/ulimit.html" target="_blank">http://ss64.com/bash/ulimit.html</a><br>
and I also found this <a moz-do-not-send="true"
href="http://lists.digium.com/pipermail/asterisk-dev/2006-October/024091.html"
target="_blank">http://lists.digium.com/pipermail/asterisk-dev/2006-October/024091.html</a>
where I could read <br>
<pre>><i> And what does 'ulimit -n' say for your Asterisk process?</i></pre>
<br>
<br>
1. How can I specificially read "ulimit -n" for asterisk, for
instance when asterisk is run by an asterisk user which has no
login or shell ?<br>
</blockquote>
<div>Finally, it seems this command is enough :<br>
su asterisk --shell /bin/sh --command "ulimit -n"<br>
</div>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. Is there an easy and safe way to increase the number of
files opened by asterisk ?<br>
</blockquote>
<div>Replace the question above by this one<br>
"Is there an easy and safe way to artificially increase the
number of files opened by asterisk ?"<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>