[asterisk-dev] Asterisk freezes because cannot create no more sockets

Giorgio Incantalupo gincantalupo at fgasoftware.com
Tue Apr 17 23:44:10 MST 2007

found a web page explaining the bug:
It seems that a patch or driver upgrade can solve the problem.

Giorgio Incantalupo

Tzafrir Cohen wrote:
> On Mon, Apr 16, 2007 at 10:11:39AM +0200, Giorgio Incantalupo wrote:
>> Hi,
>> I have an Asterisk on a Debian Sarge box with an ISDN beronet 
>> card. Sometimes my Asterisk frezees and user complain they cannot 
>> make/receive calls. I took a look inside messages log file and I saw 
>> errors like this:
>> WARNING[21701] res_agi.c: unable to create fromast pipe: Too many open files
>> WARNING[2894] acl.c: Cannot create socket
>> ERROR[21971] rtp.c: Unable to allocate socket: Too many open files
>> WARNING[21971] chan_sip.c: Unable to create RTP audio  session: Too many 
>> open files
>> ERROR[21971] chan_sip.c: Unable to build sip pvt data for '1' (Out of 
>> memory)
>> NOTICE[21971] app_dial.c: Unable to create channel of type 'SIP' (cause 
>> 42 - Switching equipment congestion)
>> WARNING[2894] acl.c: Cannot create socket
>> ...
> and naturally:   asterisk -rx "stop now"   will fail to connect due to
> lack of file handles.
>> Before restarting Asterisk I typed lsof getting a lot of lines like this 
>> (about 1000 lines):
>> asterisk  31417 asterisk 1021w     FIFO        0,5              749130 pipe
>> asterisk  31417 asterisk 1022w     FIFO        0,5              749266 pipe
>> asterisk  31417 asterisk 1023w     FIFO        0,5              749285 
>> pipe    <---last one of my output!
>> It seems that asterisk is creating pipes for some unknown (to me) reason.
>> Is there anybody who knows what is creating all these pipes? I'd like to 
>> avoid a scheduled "restart now" every day (smells like Microsoft style...)
>> Consider that we have many PBXes but this strange phenomena seems to 
>> happen only with ISDN (we have Asterisk Boxes with PRI cards but got no 
>> problems at all even with a lot of calls per minutes).
> What do you see in:
>   ls -l /proc/`cat /var/run/asterisk/asterisk.pid`/fd
> (note: this should have 1024 lines)
> If this is a an unnamed pipe, how do you find the other side?

More information about the asterisk-dev mailing list