Hi, Recently, I got the following error from the system and it caused the asterisk down. Apr 25 13:48:22 WARNING[27460] rtp.c: Unable to allocate socket: Too many open files Apr 25 13:48:22 WARNING[27460] acl.c: Cannot create socket The output of ulimit is "unlimited". I have searched about the error but there is no solution to avoid it. Then I issue lsof in the system and I got many asterisk with pipe output like below. asterisk 325 root 4469r FIFO 0,7 4474531 p ipe asterisk 325 root 4470r FIFO 0,7 4473427 p ipe Such message of lsof will keep growing. I think it is the reason to reach the maximum socket opened. According to the lsof above, I have no idea what hold the socket and keep it growing. Anyone can give me some hints?
What does ulimit -a say? Did you update limits.conf. This is a documented issue: http://voip-info.org/wiki/index.php?page=file%20descriptors Justin On 4/25/07, Rilawich Ango <maillisting@gmail.com> wrote:> > Hi, > Recently, I got the following error from the system and it caused > the asterisk down. > Apr 25 13:48:22 WARNING[27460] rtp.c: Unable to allocate socket: Too > many open files > Apr 25 13:48:22 WARNING[27460] acl.c: Cannot create socket > > The output of ulimit is "unlimited". > > I have searched about the error but there is no solution to avoid it. > Then I issue lsof in the system and I got many asterisk with pipe > output like below. > asterisk 325 root 4469r > FIFO 0,7 4474531 p > ipe > asterisk 325 root 4470r > FIFO 0,7 4473427 p > ipe > Such message of lsof will keep growing. I think it is the reason to > reach the maximum socket opened. According to the lsof above, I have > no idea what hold the socket and keep it growing. Anyone can give me > some hints? > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070425/300ae732/attachment.htm
I have already issue "ulimit -n 65535" in safe_asterisk as I run asterisk by root. I get the result of ulimit -a as following. core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 1024 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 16382 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited On 4/26/07, Justin Hamade <justhamade@gmail.com> wrote:> What does ulimit -a say? > > Did you update limits.conf. This is a documented issue: > http://voip-info.org/wiki/index.php?page=file%20descriptors > > Justin > > > On 4/25/07, Rilawich Ango <maillisting@gmail.com> wrote: > > > > Hi, > > Recently, I got the following error from the system and it caused > > the asterisk down. > > Apr 25 13:48:22 WARNING[27460] rtp.c: Unable to allocate socket: Too > > many open files > > Apr 25 13:48:22 WARNING[27460] acl.c: Cannot create socket > > > > The output of ulimit is "unlimited". > > > > I have searched about the error but there is no solution to avoid it. > > Then I issue lsof in the system and I got many asterisk with pipe > > output like below. > > asterisk 325 root 4469r FIFO 0,7 > 4474531 p > > ipe > > asterisk 325 root 4470r FIFO 0,7 > 4473427 p > > ipe > > Such message of lsof will keep growing. I think it is the reason to > > reach the maximum socket opened. According to the lsof above, I have > > no idea what hold the socket and keep it growing. Anyone can give me > > some hints? > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > asterisk-users mailing list > > To UNSUBSCRIBE or update options visit: > > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > > -- > Justin > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Tzafrir Cohen wrote:>On Thu, Apr 26, 2007 at 08:43:17AM -0500, Jason Fuermann wrote: > > >>1024 open files will get you around 120 concurrent calls. >> >> > >8 file-handles per call? Why is that? > > >Depends on what channel type you use and what you do in the dialplan. A file handle is also used for an open socket. I always ran into that kind of problem when conferencing and play soundfiles to the conference members. Try before starting asterisk to ulimit your shell to a higher value of file handles. AFAIK its ulimit -n. -- Knud A. M?ller
Matthew J. Roth
2007-Apr-26 10:07 UTC
[asterisk-users] Too many open files, asterisk crash
Rilawich, Here are a couple of my old posts that document how to guarantee that Asterisk starts with an increased number of file descriptors available: Too many open files <http://lists.digium.com/pipermail/asterisk-users/2006-April/147204.html> Asterisk Open File Limit <http://lists.digium.com/pipermail/asterisk-dev/2006-October/024092.html> Good luck, Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer