<div dir="ltr">Strange. What's the output of:<div>lsof -u <USER RUNNING ASTERISK> | wc -l <br></div><div><br></div><div>I know that on some CentOS7 setups we needed to remove the file 90-nproc.conf as well as add to the Asterisk init script:</div><div><div>ulimit -s unlimited</div><div>ulimit -n 65535</div><div>ulimit -Hn 65535</div><div>ulimit -u 65535</div><div>ulimit -Hu 65535</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 13, 2016 at 9:59 AM, Ahmed Munir <span dir="ltr"><<a href="mailto:ahmedmunir007@gmail.com" target="_blank">ahmedmunir007@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra">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 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></div><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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.c<wbr>om</a>><br>
Subject: Re: [asterisk-users] Openfile Issue<br>
Message-ID:<br>
<<a href="mailto:CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gmail.com" target="_blank">CAM3TTh2ykzifYwjoqF1EZkn9qRuV<wbr>LHLi38cMPP6UxJsqcK4pQg@mail.gm<wbr>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), 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 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 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 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/attachments/20161013/dd80ddc4/attachment.html" rel="noreferrer" target="_blank">http://lists.digium.com/piper<wbr>mail/asterisk-users/attachment<wbr>s/20161013/dd80ddc4/attachment<wbr>.html</a>><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/commun<wbr>ity/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/wiki<wbr>/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/mailm<wbr>an/listinfo/asterisk-users</a><br>
<br>
End of asterisk-users Digest, Vol 147, Issue 11<br>
******************************<wbr>*****************<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-6615161503696531502gmail-m_1983669461030832408gmail_signature">Regards,<br><br>Ahmed Munir Chohan<br><br></div>
</font></span></div></div>
<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/<wbr>community/astricon-user-<wbr>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/<wbr>wiki/display/AST/Getting+<wbr>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/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br></blockquote></div><br></div>