<div dir="ltr"><div class="gmail_quote">See below;<br><br>[root@abc asterisk]# lsof -u 50771 | wc -l<br>0<br><br></div>BTW, I'm using CentOS 6.5<div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra">From: Dovid Bender <<a href="mailto:dovid@telecurve.com" target="_blank">dovid@telecurve.com</a>><br><div><div class="gmail-h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
<<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.c<wbr>om</a>><br>
Subject: Re: [asterisk-users] Openfile Issue<br>
Message-ID:<br>
<CAM3TTh1yvoHmRUBb=<a href="mailto:EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com" target="_blank">EJbEb-HMmni<wbr>-5ExKDCUMgQhnAeGF70qOA@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Strange. What's the output of:<br>
lsof -u <USER RUNNING ASTERISK> | wc -l<br>
<br>
I know that on some CentOS7 setups we needed to remove the<br>
file 90-nproc.conf as well as add to the Asterisk init script:<br>
ulimit -s unlimited<br>
ulimit -n 65535<br>
ulimit -Hn 65535<br>
ulimit -u 65535<br>
ulimit -Hu 65535<br>
<br>
<br>
<br>
On Thu, Oct 13, 2016 at 9:59 AM, Ahmed Munir <<a href="mailto:ahmedmunir007@gmail.com" target="_blank">ahmedmunir007@gmail.com</a>><br>
wrote:<br>
<br>
><br>
> See below;<br>
><br>
> [root@abc asterisk]# cat /proc/50771/limits<br>
> Limit Soft Limit Hard Limit Units<br>
> Max cpu time unlimited unlimited seconds<br>
> Max file size unlimited unlimited bytes<br>
> Max data size unlimited unlimited bytes<br>
> Max stack size 10485760 unlimited bytes<br>
> Max core file size unlimited unlimited bytes<br>
> Max resident set unlimited unlimited bytes<br>
> Max processes 256389 256389<br>
> processes<br>
> Max open files 20000 25000 files<br>
> Max locked memory 65536 65536 bytes<br>
> Max address space unlimited unlimited bytes<br>
> Max file locks unlimited unlimited locks<br>
> Max pending signals 256389 256389 signals<br>
> Max msgqueue size 819200 819200 bytes<br>
> Max nice priority 0 0<br>
> Max realtime priority 0 0<br>
> Max realtime timeout unlimited unlimited us<br>
><br>
><br>
> Date: Thu, 13 Oct 2016 09:37:34 -0400<br>
>> From: Dovid Bender <<a href="mailto:dovid@telecurve.com" target="_blank">dovid@telecurve.com</a>><br>
>> To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
>> <<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.<wbr>com</a>><br>
>> Subject: Re: [asterisk-users] Openfile Issue<br>
>> Message-ID:<br>
>> <<a href="mailto:CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm" target="_blank">CAM3TTh2ykzifYwjoqF1EZkn9qRu<wbr>VLHLi38cMPP6UxJsqcK4pQg@mail.<wbr>gm</a><br>
>> <a href="http://ail.com" rel="noreferrer" target="_blank">ail.com</a>><br>
>> Content-Type: text/plain; charset="utf-8"<br>
>><br>
>> What do you get when you do:<br>
>> cat /proc/<PID OF ASTERISK>/limits ?<br>
>><br>
>> On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <<a href="mailto:ahmedmunir007@gmail.com" target="_blank">ahmedmunir007@gmail.com</a>><br>
>> wrote:<br>
>><br>
>> > Hi all,<br>
>> ><br>
>> > Now a days getting openfile issues on asterisk quite often even setting<br>
>> > system soft limit to 20000 and hard limit to 25000 and issue usually<br>
>> > occurs during openfile socket consumed by system and asterisk is quite<br>
>> > smaller than the soft or hard limit. See below system and asterisk logs;<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Too many LOG file moved successfully - messages<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Asterisk openfile count: 1252<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Total system open files count: 4091<br>
>> ><br>
>> > 2016:10:13_08:19:01 | SIP channels: 93 active calls|1563 calls processed<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Asterisk SIP peers: 366<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Asterisk service uptime: System uptime: 4 days, 4<br>
>> > hours, 12 minutes, 33 seconds<br>
>> ><br>
>> > Last reload: 4 days, 4 hours, 12 minutes, 33 seconds<br>
>> ><br>
>> > Privilege escalation protection disabled!<br>
>> ><br>
>> > See <a href="https://wiki.asterisk.org/wiki/x/1gKfAQ" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wiki<wbr>/x/1gKfAQ</a> for more details.<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Socket Summary<br>
>> ><br>
>> > Total: 648 (kernel 758)<br>
>> ><br>
>> > TCP: 20 (estab 8, closed 5, orphaned 0, synrecv 0, timewait 1/0),<br>
>> ports<br>
>> > 14<br>
>> ><br>
>> ><br>
>> ><br>
>> > Transport Total IP IPv6<br>
>> ><br>
>> > * 758 - -<br>
>> ><br>
>> > RAW 0 0 0<br>
>> ><br>
>> > UDP 422 419 3<br>
>> ><br>
>> > TCP 15 14 1<br>
>> ><br>
>> > INET 437 433 4<br>
>> ><br>
>> > FRAG 0 0 0<br>
>> ><br>
>> > 2016:10:13_08:19:01 | Logged successfully all the required details<br>
>> ><br>
>> ><br>
>> > [2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c:<br>
>> > Failed to create timerfd timer: Too many open files<br>
>> ><br>
>> > [2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create<br>
>> socket<br>
>> ><br>
>> > [2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c:<br>
>> > Failed to create timerfd timer: Too many open files<br>
>> ><br>
>> > [2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create<br>
>> socket<br>
>> ><br>
>> > [2016-10-13 08:18:41] ERROR[50689][C-00000629] res_timing_timerfd.c:<br>
>> > Failed to create timerfd timer: Too many open files<br>
>> ><br>
>> > [2016-10-13 08:18:41] ERROR[50689][C-00000629] acl.c: Cannot create<br>
>> socket<br>
>> ><br>
>> > [2016-10-13 08:18:40] ERROR[49913][C-000005b7] cdr_csv.c: Unable to<br>
>> > re-open master file /var/log/asterisk//cdr-csv//Ma<wbr>ster.csv : Too many<br>
>> > open files<br>
>> ><br>
>> > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket<br>
>> ><br>
>> > [2016-10-13 08:18:40] ERROR[49833][C-0000059c] cdr_csv.c: Unable to<br>
>> > re-open master file /var/log/asterisk//cdr-csv//Ma<wbr>ster.csv : Too many<br>
>> > open files<br>
>> ><br>
>> > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket<br>
>> ><br>
>> > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket<br>
>> ><br>
>> > Further added, I'm using CentOS 6.5 as OS.<br>
>> ><br>
>> > Please advise what changes required for permanently fixing this random<br>
>> > issue.<br>
>> ><br>
>> ><br>
>> > --<br>
>> > Regards,<br>
>> ><br>
>> > Ahmed Munir Chohan<br>
>> ><br>
>> ><br>
>> > --<br>
>> > ______________________________<wbr>______________________________<wbr>_________<br>
>> > -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
>> ><br>
>> > Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
>> > <a href="http://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">http://www.asterisk.org/commu<wbr>nity/astricon-user-conference</a><br>
>> ><br>
>> > New to Asterisk? Start here:<br>
>> > <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wik<wbr>i/display/AST/Getting+Started</a><br>
>> ><br>
>> > asterisk-users mailing list<br>
>> > To UNSUBSCRIBE or update options visit:<br>
>> > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailma<wbr>n/listinfo/asterisk-users</a><br>
>> ><br>
>> -------------- next part --------------<br>
>> An HTML attachment was scrubbed...<br>
>> URL: <<a href="http://lists.digium.com/pipermail/asterisk-users/attachment" rel="noreferrer" target="_blank">http://lists.digium.com/piper<wbr>mail/asterisk-users/attachment</a><br>
>> s/20161013/dd80ddc4/attachment<wbr>.html><br>
>><br>
>> ------------------------------<br>
>><br>
>> ______________________________<wbr>_________________<br>
>> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" rel="noreferrer" target="_blank">http://www.api-digital.com--</a><br>
>><br>
>> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
>> <a href="http://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">http://www.asterisk.org/commu<wbr>nity/astricon-user-conference</a><br>
>><br>
>> New to Asterisk? Start here:<br>
>> <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wik<wbr>i/display/AST/Getting+Started</a><br>
>><br>
>> asterisk-users mailing list<br>
>> To UNSUBSCRIBE or update options visit:<br>
>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailma<wbr>n/listinfo/asterisk-users</a><br>
>><br>
>> End of asterisk-users Digest, Vol 147, Issue 11<br>
>> ******************************<wbr>*****************<br>
>><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
><br>
> Ahmed Munir Chohan<br>
><br>
><br>
> --<br>
> ______________________________<wbr>______________________________<wbr>_________<br>
> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
><br>
> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
> <a href="http://www.asterisk.org/community/astricon-user-conference" rel="noreferrer" target="_blank">http://www.asterisk.org/commu<wbr>nity/astricon-user-conference</a><br>
><br>
> New to Asterisk? Start here:<br>
> <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/wik<wbr>i/display/AST/Getting+Started</a><br>
><br>
> asterisk-users mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailma<wbr>n/listinfo/asterisk-users</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.digium.com/pipermail/asterisk-users/attachments/20161013/a78838d3/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.digium.com/piper<wbr>mail/asterisk-users/attachment<wbr>s/20161013/a78838d3/attachment<wbr>-0001.html</a>><br>
<br></blockquote></div></div></div><span class="gmail-"><div class="gmail-m_2589095203210478669gmail_signature"><br></div>
</span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Regards,<br><br>Ahmed Munir Chohan<br><br></div>
</div></div>