Found : Re: [Asterisk-Users] Sip too many open files?
Steven Critchfield
critch at basesys.com
Wed Jun 25 07:21:06 MST 2003
Php potentially has many bugs, especially when used in CLI. I would
check to make sure you didn't open using pconnect first. Persistent
connects in CLI mode PHP don't make sense and could cause that problem.
Unless you need php, you should be able to convert it to perl really
easy. If the script is simple enough, you may want to see about using
the PGSQL module and do it all in the extension logic. This last option
is what I do for my "on-call" phone line.
On Wed, 2003-06-25 at 06:10, Matteo Brancaleoni wrote:
> mmh, I think I found the problem.
> seems that my agi script that I use to lookup channels
> on a db doesn't close the pipe properly.
> So fd descriptors starts to pile up until the process
> max files is reached...
>
> My script is written in php-4.3.2 (cli). Is very simple,
> and I open & close sockets properly via fclose($fd)
> and so on...
>
> Does anybody knows if there're problem with php-4.3.2 for
> agi scripts ?
>
> Matteo.
>
> (I attach my php script, just to see if someone finds bugs)
> ;)
>
>
> Il lun, 2003-06-23 alle 16:32, Brancaleoni Matteo ha scritto:
> > Today my pbx stopped responding to my sip phones..
> > looking into the log, here what I got:
> >
> > Jun 23 15:50:05 WARNING[7176]: File rtp.c, Line 586 (ast_rtp_new):
> > Unable to allocate socket: Too many open files
> > Jun 23 15:50:05 WARNING[7176]: File chan_sip.c, Line 1308 (sip_alloc):
> > Unable to create RTP session: Too many open files
> > Jun 23 15:50:05 WARNING[7176]: File chan_sip.c, Line 4655
> > (sip_send_mwi_to_peer): Unable to build sip pvt data for MWI
> > Jun 23 15:51:07 WARNING[7176]: File rtp.c, Line 586 (ast_rtp_new):
> > Unable to allocate socket: Too many open files
> > Jun 23 15:51:07 WARNING[7176]: File chan_sip.c, Line 1308 (sip_alloc):
> > Unable to create RTP session: Too many open files
> > Jun 23 15:51:07 WARNING[7176]: File chan_sip.c, Line 4655
> > (sip_send_mwi_to_peer): Unable to build sip pvt data for MWI
> > Jun 23 15:51:07 WARNING[7176]: File channel.c, Line 293
> > (ast_channel_alloc): Alert pipe creation failed!
> > Jun 23 15:51:07 WARNING[7176]: File chan_sip.c, Line 1152 (sip_new):
> > Unable to allocate channel structure
> > Jun 23 15:51:07 NOTICE[7176]: File chan_sip.c, Line 4414
> > (handle_request): Unable to create/find channel
> > Jun 23 15:53:14 WARNING[7176]: File channel.c, Line 293
> > (ast_channel_alloc): Alert pipe creation failed!
> > Jun 23 15:53:14 WARNING[7176]: File chan_sip.c, Line 1152 (sip_new):
> > Unable to allocate channel structure
> > Jun 23 15:53:14 NOTICE[7176]: File chan_sip.c, Line 4414
> > (handle_request): Unable to create/find channel
> > Jun 23 15:53:34 WARNING[7176]: File rtp.c, Line 586 (ast_rtp_new):
> > Unable to allocate socket: Too many open files
> > Jun 23 15:53:34 WARNING[7176]: File chan_sip.c, Line 1308 (sip_alloc):
> > Unable to create RTP session: Too many open files
> > Jun 23 15:53:34 WARNING[7176]: File chan_sip.c, Line 4655
> > (sip_send_mwi_to_peer): Unable to build sip pvt data for MWI
> > Jun 23 15:53:34 WARNING[7176]: File channel.c, Line 293
> > (ast_channel_alloc): Alert pipe creation failed!
> > Jun 23 15:53:34 WARNING[7176]: File chan_sip.c, Line 1152 (sip_new):
> > Unable to allocate channel structure
> >
> > Also wasn't possible to connect via a unix console...
> > And so on... until I restarted the asterisk proc.
> > What can cause that?
> > I'm running CVS-06/22/03-16:32:23 , on a p4 2.4ghz
> > and 512 mb ram, kern 2.4.21
> >
> > Thanks a lot,
> > Matteo
--
Steven Critchfield <critch at basesys.com>
More information about the asterisk-users
mailing list