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

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Apr 16 02:19:56 MST 2007


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?

-- 
               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-dev mailing list