[Asterisk-Dev] Asterisk SIP Problem

Adam Hart adam at teragen.com.au
Wed Jun 9 04:48:06 MST 2004


tried ulimit -n 10000 ? (in safe_asterisk)

Pedro Bessa Goncalves wrote:
> Hi. I am having a problem with asterisk. When I have a big number of 
> simultaneous SIP clients (>70) connecting to asterisk, I start having 
> file limit (rlimit) problems and the clients can't connect:
> 
>         Jun  9 12:16:06 WARNING[5126]: Unexpected bind error: Invalid 
> argument
>         Jun  9 12:16:06 WARNING[5126]: Unable to create RTP session: 
> Invalid argument
>         Jun  9 12:16:06 WARNING[5126]: Unable to get IP of eth0: Bad 
> file descriptor
>         Jun  9 12:16:06 WARNING[17422]: Couldn't open file 
> /home/pbg/meteo/meteomain.alaw
>         Jun  9 12:16:06 WARNING[17422]: Unable to open 
> /home/pbg/meteo/meteomain (format ALAW): No such file or directory
> 
>         Jun  9 12:16:06 WARNING[17422]: ast_streamfile failed on 
> SIP/4000-ce60 for /home/pbg/meteo/meteomain
>         Jun  9 12:16:06 WARNING[5126]: Alert pipe creation failed!
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate channel structure
>         Jun  9 12:16:06 NOTICE[5126]: Unable to create/find channel
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate socket: Too 
> many open files
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate socket: Too 
> many open files
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate socket: Too 
> many open files
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate socket: Too 
> many open files
>         Jun  9 12:16:06 WARNING[5126]: Unable to create RTP session: Too 
> many open files
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate socket: Too 
> many open files
>         Jun  9 12:16:06 WARNING[5126]: Unable to allocate socket: Too 
> many open files
> 
> I have also tried applied the following code in asterisk.c but still had 
> no luck:
> 
>         struct rlimit l;
> 
>         memset(&l, 0, sizeof(l));
>         l.rlim_cur = RLIM_INFINITY;
>         l.rlim_max = RLIM_INFINITY;
> 
>         if (setrlimit(RLIMIT_NOFILE, &l)) {
>                 ast_log(LOG_WARNING, "Unable to change opened files 
> limit: %s\n", strerror(errno));
>         }
> 
> Can anyone help me??
> 
> Pedro Goncalves
> www.ptinovacao.pt
> 




More information about the asterisk-dev mailing list