Re: [asterisk-users] How to read/set ulimit for non-root asterisk process ?

2013-02-18 Thread Thorsten Göllner

Hi Olivier,

you have to edit /etc/security/limits.conf. Take a look at "man 
limits.conf".


Some users also modify the Asterisk-Start-Script. You can insert an 
"ulimit -n 8192" in the "Start-Case".


Best regard
-Thorsten-

Am 15.02.2013 18:48, schrieb Olivier:



2013/2/15 Olivier mailto:oza_4...@yahoo.fr>>

Hello,

On a production system, I'm seeing this:
[Feb 13 16:47:00] WARNING[14742] res_agi.c: Unable to create toast
pipe: Too many open files
[Feb 13 16:47:00] WARNING[9283] acl.c: Cannot create socket
[Feb 13 16:47:00] WARNING[9283] rtp.c: Unable to allocate RTCP
socket: Too many open files
[Feb 13 16:47:00] WARNING[14732] acl.c: Cannot create socket
[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
[Feb 13 16:47:00] WARNING[14732] chan_sip.c: Unable to allocate
AST channel structure for SIP channel
[Feb 13 16:47:00] WARNING[14732] app_dial.c: Unable to create
channel of type 'SIP' (cause 0 - Unknown)
[Feb 13 16:47:00] ERROR[14732] rtp.c: Unable to allocate socket:
Too many open files


Typing ulimit -a, shows :
# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) unlimited
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited


So it seems that increasing this open files limit from 1024 to
2048 could work around the above issue.

Strangely, I can't find much online doc on ulimit and its usage.
My main source is http://ss64.com/bash/ulimit.html
and I also found this
http://lists.digium.com/pipermail/asterisk-dev/2006-October/024091.html
where I could read

>/  And what does 'ulimit -n' say for your Asterisk process?/



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 ?

Finally, it seems this command is enough :
su asterisk --shell /bin/sh --command "ulimit -n"

2. Is there an easy and safe way to increase the number of files
opened by asterisk ?

Replace the question above by this one
"Is there an easy and safe way to artificially increase the number of 
files opened by asterisk ?"


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] How to read/set ulimit for non-root asterisk process ?

2013-02-15 Thread Olivier
2013/2/15 Olivier 

> Hello,
>
> On a production system, I'm seeing this:
> [Feb 13 16:47:00] WARNING[14742] res_agi.c: Unable to create toast pipe:
> Too many open files
> [Feb 13 16:47:00] WARNING[9283] acl.c: Cannot create socket
> [Feb 13 16:47:00] WARNING[9283] rtp.c: Unable to allocate RTCP socket: Too
> many open files
> [Feb 13 16:47:00] WARNING[14732] acl.c: Cannot create socket
> [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
> [Feb 13 16:47:00] WARNING[14732] chan_sip.c: Unable to allocate AST
> channel structure for SIP channel
> [Feb 13 16:47:00] WARNING[14732] app_dial.c: Unable to create channel of
> type 'SIP' (cause 0 - Unknown)
> [Feb 13 16:47:00] ERROR[14732] rtp.c: Unable to allocate socket: Too many
> open files
>
>
> Typing ulimit -a, shows :
> # ulimit -a
> core file size  (blocks, -c) 0
> data seg size   (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size   (blocks, -f) unlimited
> pending signals (-i) 16382
> max locked memory   (kbytes, -l) 64
> max memory size (kbytes, -m) unlimited
> open files  (-n) 1024
> pipe size(512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority  (-r) 0
> stack size  (kbytes, -s) 8192
> cpu time   (seconds, -t) unlimited
> max user processes  (-u) unlimited
> virtual memory  (kbytes, -v) unlimited
> file locks  (-x) unlimited
>
>
> So it seems that increasing this open files limit from 1024 to 2048 could
> work around the above issue.
>
> Strangely, I can't find much online doc on ulimit and its usage.
> My main source is http://ss64.com/bash/ulimit.html
> and I also found this
> http://lists.digium.com/pipermail/asterisk-dev/2006-October/024091.htmlwhere 
> I could read
>
> >* And what does 'ulimit -n' say for your Asterisk process?*
>
>
>
> 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 ?
>
Finally, it seems this command is enough :
su asterisk --shell /bin/sh --command "ulimit -n"


> 2. Is there an easy and safe way to increase the number of files opened by
> asterisk ?
>
Replace the question above by this one
"Is there an easy and safe way to artificially increase the number of files
opened by asterisk ?"


>
>
> Regards
>
>
>
>
>
>
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] How to read/set ulimit for non-root asterisk process ?

2013-02-15 Thread Olivier
Hello,

On a production system, I'm seeing this:
[Feb 13 16:47:00] WARNING[14742] res_agi.c: Unable to create toast pipe:
Too many open files
[Feb 13 16:47:00] WARNING[9283] acl.c: Cannot create socket
[Feb 13 16:47:00] WARNING[9283] rtp.c: Unable to allocate RTCP socket: Too
many open files
[Feb 13 16:47:00] WARNING[14732] acl.c: Cannot create socket
[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
[Feb 13 16:47:00] WARNING[14732] chan_sip.c: Unable to allocate AST channel
structure for SIP channel
[Feb 13 16:47:00] WARNING[14732] app_dial.c: Unable to create channel of
type 'SIP' (cause 0 - Unknown)
[Feb 13 16:47:00] ERROR[14732] rtp.c: Unable to allocate socket: Too many
open files


Typing ulimit -a, shows :
# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) unlimited
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited


So it seems that increasing this open files limit from 1024 to 2048 could
work around the above issue.

Strangely, I can't find much online doc on ulimit and its usage.
My main source is http://ss64.com/bash/ulimit.html
and I also found this
http://lists.digium.com/pipermail/asterisk-dev/2006-October/024091.htmlwhere
I could read

>* And what does 'ulimit -n' say for your Asterisk process?*



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 ?
2. Is there an easy and safe way to increase the number of files opened by
asterisk ?


Regards
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users