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

Giorgio Incantalupo gincantalupo at fgasoftware.com
Mon Apr 16 03:49:54 MST 2007


Hi Tzafrir,
I cannot launch the command you gave me because I had to restart 
Asterisk (it was in production) but I can use it to monitor my server. :-)
I used it on our PBX and I noticed that after making a call some socket 
remain opened, so I make a stop now and then I relaunched Asterisk but 
found no trace of sockets left opened.
How can I know what is a socket or pipe referring to?
For example, how can I know where are the following socket and pipe 
connected to?
lr-x------  1 asterisk asterisk 64 2007-04-11 14:11 24 -> socket:[273676]
l-wx------  1 asterisk asterisk 64 2007-04-13 09:15 31 -> pipe:[273693]

TIA

Giorgio Incantalupo

Tzafrir Cohen wrote:
> On Mon, Apr 16, 2007 at 10:11:39AM +0200, Giorgio Incantalupo wrote:
>   
>> Hi,
>> I have an Asterisk 1.2.9.1 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