[asterisk-users] asterisk freeze due to "too many open file" error

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Feb 15 11:18:16 MST 2007


On Thu, Feb 15, 2007 at 04:47:56PM +0100, Giorgio Incantalupo wrote:
> Hi Tzafrir,
> it was the only solution. I had to kill Asterisk and restart it. I've 
> got many PBX installed but this is the first time it happened. I've 
> searched for some opened file limit in linux but found nothing and 
> "ulimit" says "unlimited".

The asterisk process did could not get an extra file descriptor.
This may be because you have some ~1000 channels (or maybe less, if you
use something based on h323?).

An extra file descriptor is also needed to answer a manger connection
and also needed to answer an rasterisk (asterisk -r) connection. Thus
you need to kill the asterisk process directly.

Anyway, killing a process with SIGTERM is not that bad. It does give the
process the time to tidy up.


Now, if you weren't uing so many channels, it is good to know whay file
descriptors leaked. To do that, have a look occasionally at
/proc/PID_OF_ASTERISK/fd . that "directory" shows all the current file
descriptors the Asterisk process uses. Before killing that asterisk
process, run:

  ls -l /proc/PID_OF_ASTERISK/fd >fds_of_asterisk

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list