Re: [asterisk-users] Openfile Issue
See below output; [root@abc ~]# lsof -u root | wc -l 5116 From: Dovid Bender <do...@telecurve.com> > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users@lists.digium.com> > Subject: Re: [asterisk-users] Openfile Issue > Message-ID: > <CAM3TTh3QA3AqrNNGC1GuSHPGzW1-hGtRPg5hByM1QpBvGcb1Yg@mail. > gmail.com> > Content-Type: text/plain; charset="utf-8" > > 50771 is the PID. I am talking about the user. for instances if running as > root (which you should never do) then: > lsof -u root | wc -l > > On Thu, Oct 13, 2016 at 1:31 PM, Ahmed Munir <ahmedmunir...@gmail.com> > wrote: > > > > > [root@abc asterisk]# lsof -u 50771 | wc -l > > 0 > > > > BTW, I'm using CentOS 6.5 > > > > > > > >> > >> Date: Thu, 13 Oct 2016 10:20:19 -0400 > >>> From: Dovid Bender <do...@telecurve.com> > >>> To: Asterisk Users Mailing List - Non-Commercial Discussion > >>> <asterisk-users@lists.digium.com> > >>> Subject: Re: [asterisk-users] Openfile Issue > >>> Message-ID: > >>>
Re: [asterisk-users] Openfile Issue
See below; [root@abc asterisk]# lsof -u 50771 | wc -l 0 BTW, I'm using CentOS 6.5 > From: Dovid Bender <do...@telecurve.com> > >> To: Asterisk Users Mailing List - Non-Commercial Discussion >> <asterisk-users@lists.digium.com> >> Subject: Re: [asterisk-users] Openfile Issue >> Message-ID: >>
Re: [asterisk-users] Openfile Issue
On Thu, 13 Oct 2016, Dovid Bender wrote: 50771 is the PID. I am talking about the user. for instances if running as root (which you should never do) then: lsof -u root | wc -l Wouldn't sudo lsof -c asterisk | wc --lines be more direct and accurate? -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281-- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 http://www.asterisk.org/community/astricon-user-conference New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Openfile Issue
50771 is the PID. I am talking about the user. for instances if running as root (which you should never do) then: lsof -u root | wc -l On Thu, Oct 13, 2016 at 1:31 PM, Ahmed Munir <ahmedmunir...@gmail.com> wrote: > > [root@abc asterisk]# lsof -u 50771 | wc -l > 0 > > BTW, I'm using CentOS 6.5 > > > >> >> Date: Thu, 13 Oct 2016 10:20:19 -0400 >>> From: Dovid Bender <do...@telecurve.com> >>> To: Asterisk Users Mailing List - Non-Commercial Discussion >>> <asterisk-users@lists.digium.com> >>> Subject: Re: [asterisk-users] Openfile Issue >>> Message-ID: >>>
Re: [asterisk-users] Openfile Issue
[root@abc asterisk]# lsof -u 50771 | wc -l 0 BTW, I'm using CentOS 6.5 > > Date: Thu, 13 Oct 2016 10:20:19 -0400 >> From: Dovid Bender <do...@telecurve.com> >> To: Asterisk Users Mailing List - Non-Commercial Discussion >> <asterisk-users@lists.digium.com> >> Subject: Re: [asterisk-users] Openfile Issue >> Message-ID: >>
Re: [asterisk-users] Openfile Issue
Strange. What's the output of: lsof -u | wc -l 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: ulimit -s unlimited ulimit -n 65535 ulimit -Hn 65535 ulimit -u 65535 ulimit -Hu 65535 On Thu, Oct 13, 2016 at 9:59 AM, Ahmed Munir <ahmedmunir...@gmail.com> wrote: > > See below; > > [root@abc asterisk]# cat /proc/50771/limits > Limit Soft Limit Hard Limit Units > Max cpu time unlimitedunlimitedseconds > Max file size unlimitedunlimitedbytes > Max data size unlimitedunlimitedbytes > Max stack size10485760 unlimitedbytes > Max core file sizeunlimitedunlimitedbytes > Max resident set unlimitedunlimitedbytes > Max processes 256389 256389 > processes > Max open files225000files > Max locked memory 6553665536bytes > Max address space unlimitedunlimitedbytes > Max file locksunlimitedunlimitedlocks > Max pending signals 256389 256389 signals > Max msgqueue size 819200 819200 bytes > Max nice priority 00 > Max realtime priority 00 > Max realtime timeout unlimitedunlimitedus > > > Date: Thu, 13 Oct 2016 09:37:34 -0400 >> From: Dovid Bender <do...@telecurve.com> >> To: Asterisk Users Mailing List - Non-Commercial Discussion >> <asterisk-users@lists.digium.com> >> Subject: Re: [asterisk-users] Openfile Issue >> Message-ID: >> <cam3tth2ykzifywjoqf1ezkn9qruvlhli38cmpp6uxjsqck4...@mail.gm >> ail.com> >> Content-Type: text/plain; charset="utf-8" >> >> What do you get when you do: >> cat /proc//limits ? >> >> On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir...@gmail.com> >> wrote: >> >> > Hi all, >> > >> > Now a days getting openfile issues on asterisk quite often even setting >> > system soft limit to 2 and hard limit to 25000 and issue usually >> > occurs during openfile socket consumed by system and asterisk is quite >> > smaller than the soft or hard limit. See below system and asterisk logs; >> > >> > 2016:10:13_08:19:01 | Too many LOG file moved successfully - messages >> > >> > 2016:10:13_08:19:01 | Asterisk openfile count: 1252 >> > >> > 2016:10:13_08:19:01 | Total system open files count: 4091 >> > >> > 2016:10:13_08:19:01 | SIP channels: 93 active calls|1563 calls processed >> > >> > 2016:10:13_08:19:01 | Asterisk SIP peers: 366 >> > >> > 2016:10:13_08:19:01 | Asterisk service uptime: System uptime: 4 days, 4 >> > hours, 12 minutes, 33 seconds >> > >> > Last reload: 4 days, 4 hours, 12 minutes, 33 seconds >> > >> > Privilege escalation protection disabled! >> > >> > See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. >> > >> > 2016:10:13_08:19:01 | Socket Summary >> > >> > Total: 648 (kernel 758) >> > >> > TCP: 20 (estab 8, closed 5, orphaned 0, synrecv 0, timewait 1/0), >> ports >> > 14 >> > >> > >> > >> > Transport Total IPIPv6 >> > >> > * 758 - - >> > >> > RAW 0 0 0 >> > >> > UDP 422 419 3 >> > >> > TCP 15141 >> > >> > INET 437 433 4 >> > >> > FRAG 0 0 0 >> > >> > 2016:10:13_08:19:01 | Logged successfully all the required details >> > >> > >> > [2016-10-13 08:18:41] ERROR[50690][C-062a] res_timing_timerfd.c: >> > Failed to create timerfd timer: Too many open files >> > >> > [2016-10-13 08:18:41] ERROR[50690][C-062a] acl.c: Cannot create >> socket >> > >> > [2016-10-13 08:18:41] ERROR[50690][C-062a] res_timing_timerfd.c: >> > Failed to create timerfd timer: Too many open files >> > >> > [2016-10-13 08:18:41] ERROR[50690][C-062a] acl.c: Cannot create >> socket >> > >> > [2016-10-13 08:18:41] ERROR[5
Re: [asterisk-users] Openfile Issue
See below; [root@abc asterisk]# cat /proc/50771/limits Limit Soft Limit Hard Limit Units Max cpu time unlimitedunlimitedseconds Max file size unlimitedunlimitedbytes Max data size unlimitedunlimitedbytes Max stack size10485760 unlimitedbytes Max core file sizeunlimitedunlimitedbytes Max resident set unlimitedunlimitedbytes Max processes 256389 256389 processes Max open files225000files Max locked memory 6553665536bytes Max address space unlimitedunlimitedbytes Max file locksunlimitedunlimitedlocks Max pending signals 256389 256389 signals Max msgqueue size 819200 819200 bytes Max nice priority 00 Max realtime priority 00 Max realtime timeout unlimitedunlimitedus Date: Thu, 13 Oct 2016 09:37:34 -0400 > From: Dovid Bender <do...@telecurve.com> > To: Asterisk Users Mailing List - Non-Commercial Discussion > <asterisk-users@lists.digium.com> > Subject: Re: [asterisk-users] Openfile Issue > Message-ID: > <cam3tth2ykzifywjoqf1ezkn9qruvlhli38cmpp6uxjsqck4...@mail.gm > ail.com> > Content-Type: text/plain; charset="utf-8" > > What do you get when you do: > cat /proc//limits ? > > On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir...@gmail.com> > wrote: > > > Hi all, > > > > Now a days getting openfile issues on asterisk quite often even setting > > system soft limit to 2 and hard limit to 25000 and issue usually > > occurs during openfile socket consumed by system and asterisk is quite > > smaller than the soft or hard limit. See below system and asterisk logs; > > > > 2016:10:13_08:19:01 | Too many LOG file moved successfully - messages > > > > 2016:10:13_08:19:01 | Asterisk openfile count: 1252 > > > > 2016:10:13_08:19:01 | Total system open files count: 4091 > > > > 2016:10:13_08:19:01 | SIP channels: 93 active calls|1563 calls processed > > > > 2016:10:13_08:19:01 | Asterisk SIP peers: 366 > > > > 2016:10:13_08:19:01 | Asterisk service uptime: System uptime: 4 days, 4 > > hours, 12 minutes, 33 seconds > > > > Last reload: 4 days, 4 hours, 12 minutes, 33 seconds > > > > Privilege escalation protection disabled! > > > > See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. > > > > 2016:10:13_08:19:01 | Socket Summary > > > > Total: 648 (kernel 758) > > > > TCP: 20 (estab 8, closed 5, orphaned 0, synrecv 0, timewait 1/0), ports > > 14 > > > > > > > > Transport Total IPIPv6 > > > > * 758 - - > > > > RAW 0 0 0 > > > > UDP 422 419 3 > > > > TCP 15141 > > > > INET 437 433 4 > > > > FRAG 0 0 0 > > > > 2016:10:13_08:19:01 | Logged successfully all the required details > > > > > > [2016-10-13 08:18:41] ERROR[50690][C-062a] res_timing_timerfd.c: > > Failed to create timerfd timer: Too many open files > > > > [2016-10-13 08:18:41] ERROR[50690][C-062a] acl.c: Cannot create > socket > > > > [2016-10-13 08:18:41] ERROR[50690][C-062a] res_timing_timerfd.c: > > Failed to create timerfd timer: Too many open files > > > > [2016-10-13 08:18:41] ERROR[50690][C-062a] acl.c: Cannot create > socket > > > > [2016-10-13 08:18:41] ERROR[50689][C-0629] res_timing_timerfd.c: > > Failed to create timerfd timer: Too many open files > > > > [2016-10-13 08:18:41] ERROR[50689][C-0629] acl.c: Cannot create > socket > > > > [2016-10-13 08:18:40] ERROR[49913][C-05b7] cdr_csv.c: Unable to > > re-open master file /var/log/asterisk//cdr-csv//Master.csv : Too many > > open files > > > > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket > > > > [2016-10-13 08:18:40] ERROR[49833][C-059c] cdr_csv.c: Unable to > > re-open master file /var/log/asterisk//cdr-csv//Master.csv : Too many > > open files > > > > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket > > > > [2016-10-13 08:18:40] ERROR[2983] acl
Re: [asterisk-users] Openfile Issue
What do you get when you do: cat /proc//limits ? On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munirwrote: > Hi all, > > Now a days getting openfile issues on asterisk quite often even setting > system soft limit to 2 and hard limit to 25000 and issue usually > occurs during openfile socket consumed by system and asterisk is quite > smaller than the soft or hard limit. See below system and asterisk logs; > > 2016:10:13_08:19:01 | Too many LOG file moved successfully - messages > > 2016:10:13_08:19:01 | Asterisk openfile count: 1252 > > 2016:10:13_08:19:01 | Total system open files count: 4091 > > 2016:10:13_08:19:01 | SIP channels: 93 active calls|1563 calls processed > > 2016:10:13_08:19:01 | Asterisk SIP peers: 366 > > 2016:10:13_08:19:01 | Asterisk service uptime: System uptime: 4 days, 4 > hours, 12 minutes, 33 seconds > > Last reload: 4 days, 4 hours, 12 minutes, 33 seconds > > Privilege escalation protection disabled! > > See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. > > 2016:10:13_08:19:01 | Socket Summary > > Total: 648 (kernel 758) > > TCP: 20 (estab 8, closed 5, orphaned 0, synrecv 0, timewait 1/0), ports > 14 > > > > Transport Total IPIPv6 > > * 758 - - > > RAW 0 0 0 > > UDP 422 419 3 > > TCP 15141 > > INET 437 433 4 > > FRAG 0 0 0 > > 2016:10:13_08:19:01 | Logged successfully all the required details > > > [2016-10-13 08:18:41] ERROR[50690][C-062a] res_timing_timerfd.c: > Failed to create timerfd timer: Too many open files > > [2016-10-13 08:18:41] ERROR[50690][C-062a] acl.c: Cannot create socket > > [2016-10-13 08:18:41] ERROR[50690][C-062a] res_timing_timerfd.c: > Failed to create timerfd timer: Too many open files > > [2016-10-13 08:18:41] ERROR[50690][C-062a] acl.c: Cannot create socket > > [2016-10-13 08:18:41] ERROR[50689][C-0629] res_timing_timerfd.c: > Failed to create timerfd timer: Too many open files > > [2016-10-13 08:18:41] ERROR[50689][C-0629] acl.c: Cannot create socket > > [2016-10-13 08:18:40] ERROR[49913][C-05b7] cdr_csv.c: Unable to > re-open master file /var/log/asterisk//cdr-csv//Master.csv : Too many > open files > > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket > > [2016-10-13 08:18:40] ERROR[49833][C-059c] cdr_csv.c: Unable to > re-open master file /var/log/asterisk//cdr-csv//Master.csv : Too many > open files > > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket > > [2016-10-13 08:18:40] ERROR[2983] acl.c: Cannot create socket > > Further added, I'm using CentOS 6.5 as OS. > > Please advise what changes required for permanently fixing this random > issue. > > > -- > Regards, > > Ahmed Munir Chohan > > > -- > _ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 > http://www.asterisk.org/community/astricon-user-conference > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users > -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 http://www.asterisk.org/community/astricon-user-conference New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users