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 -- Matteo Brancaleoni Powered by RedHat Linux 8.0 Linux User #153521 -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GS d? s:- a- C+++ UL++++ P+ L+++ E- W+++ N++ o K- w-- O- M-- V-- PS PE- Y PGP++ t 5 X+ R tv- b++ DI D+ G e h! r++ y ------END GEEK CODE BLOCK------
On Monday 23 June 2003 09:32 am, Brancaleoni Matteo wrote:> 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 filesThe open file limit is per user, so you should still be able to login as any user the asterisk process is not running as. Once you're at that point, run 'lsof' to see what files are open. It's possible that they're all sockets which aren't getting shutdown(2) properly. -Tilghman
Matteo Brancaleoni
2003-Jun-25 04:10 UTC
Found : Re: [Asterisk-Users] Sip too many open files?
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-------------- next part -------------- A non-text attachment was scrubbed... Name: channel_bak.agi Type: application/x-php Size: 3841 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20030625/d4e6f00a/channel_bak.bin