ERROR: Too many open files

Standard Linux allows 1024 open files and on a busy asterisk server.This is from my asterisk/messages log file:[Oct 2 16:46:00] WARNING[19429] rtp.c: Unable to allocate RTCP socket:
Too many open files

[Oct 2 16:46:00] WARNING[19429] udptl.c: Unable to allocate socket:
Too many open files

[Oct 2 16:46:00] WARNING[19429] acl.c: Cannot create socket
[Oct 2 16:46:00] WARNING[19429] channel.c: Channel allocation failed: Can't create alert pipe! Try increasing max file descriptors with ulimit -n
Apr 5 08:48:38 WARNING[14899]: chan_sip.c:3079 sip_alloc: Unable to create RTP audio session: 

Too many open files

Solution :

To increase the number of open files to be allowed in Linux, follow the steps mentioned below:

Go to,
# cd /root
# vi .bashrc

Add the line “ulimit -uulimit -n 65536” in below file.

# .bashrc
# User specific aliases and functions

alias rm=’rm -i’
alias cp=’cp -i’
alias mv=’mv -i’

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc

ulimit -u unlimited -n 65536


To know more, please follow our YouTube Chanel at:
Subscribe Asterisk Training