[asterisk-users] Too many open files - 786 000 already specified as max num open files?

Stefan Viljoen viljoens at verishare.co.za
Thu May 21 04:53:10 CDT 2015


Hi guys

I have a site on Asterisk 1.8.11.0 running in Centos 6.5 that has about 150
concurrent callers.

I keep getting these types of messages in the CLI:

[May 21 11:39:21] WARNING[18469]: channel.c:1189 __ast_channel_alloc_ap:
Channel allocation failed: Can't create alert pipe! Try increasing max file
descriptors with ulimit -n
[May 21 11:39:21] WARNING[18469]: chan_sip.c:7041 sip_new: Unable to
allocate AST channel structure for SIP channel
[May 21 11:39:21] WARNING[18469]: res_rtp_asterisk.c:459 create_new_socket:
Unable to allocate RTCP socket: Too many open files
[May 21 11:39:21] ERROR[18469]: acl.c:706 ast_ouraddrfor: Cannot create
socket

I have specified this on the commandline:

ulimit -n 768000

I have also tried 

ulimit -n 512000

ulimit -n 65535

before going up to 768000

and then restarted Asterisk.

In /etc/sysctl.conf I have at the bottom

fs.file-max=768000

after also trying 65535, then 512000 .

I have run sysctl -p as root asfter adjusting the fs.file-max limit in
/etc/sysctl.conf

Furthermore in /etc/security/limits.conf I have at the bottom

asterisk soft nofile 768000
asterisk hard nofile 768000

/etc/asterisk/asterisk.conf contains in the maxfiles line 768 000 and the
line has been uncommented

After changing all of the above I have restarted asterisk.

SELinux is completely disabled.

I'm still getting the CLI error messages that there are too many open files
- can I really be exceeding 768 000 open files with 150 callers using normal
SIP phones?

The system is a fairly standard Core i7 with 8GB of RAM, load averages on it
rarely go about 0.5 with all callers running, and memory usage never going
above 4GB of 8GB physical ram accoridng to "top".

Anybody got any advice or comments?

Thanks!

Stefan




More information about the asterisk-users mailing list