Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Openfile Issue


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
ahmedmunir007 at gmail...
Guest





PostPosted: Thu Oct 13, 2016 8:30 am    Post subject: [asterisk-users] Openfile Issue Reply with quote

Hi all,


Now a days getting openfile issues on asterisk quite often even setting system  soft limit to 20000 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     IP        IPv6
*         758       -         -
RAW       0         0         0
UDP       422       419       3
TCP       15        14        1
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-0000062a] res_timing_timerfd.c: Failed to create timerfd timer: Too many open files
[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket
[2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c: Failed to create timerfd timer: Too many open files
[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket
[2016-10-13 08:18:41] ERROR[50689][C-00000629] res_timing_timerfd.c: Failed to create timerfd timer: Too many open files
[2016-10-13 08:18:41] ERROR[50689][C-00000629] acl.c: Cannot create socket
[2016-10-13 08:18:40] ERROR[49913][C-000005b7] 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-0000059c] 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
Back to top
dovid at telecurve.com
Guest





PostPosted: Thu Oct 13, 2016 8:37 am    Post subject: [asterisk-users] Openfile Issue Reply with quote

What do you get when you do:cat /proc/<PID OF ASTERISK>/limits ?


On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:
Hi all,


Now a days getting openfile issues on asterisk quite often even setting system  soft limit to 20000 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     IP        IPv6
*         758       -         -
RAW       0         0         0
UDP       422       419       3
TCP       15        14        1
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-0000062a] res_timing_timerfd.c: Failed to create timerfd timer: Too many open files
[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket
[2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c: Failed to create timerfd timer: Too many open files
[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket
[2016-10-13 08:18:41] ERROR[50689][C-00000629] res_timing_timerfd.c: Failed to create timerfd timer: Too many open files
[2016-10-13 08:18:41] ERROR[50689][C-00000629] acl.c: Cannot create socket
[2016-10-13 08:18:40] ERROR[49913][C-000005b7] 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-0000059c] 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
Back to top
ahmedmunir007 at gmail...
Guest





PostPosted: Thu Oct 13, 2016 8:59 am    Post subject: [asterisk-users] Openfile Issue Reply with quote

See below;

[root@abc asterisk]# cat /proc/50771/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             256389               256389               processes
Max open files            20000                25000                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       256389               256389               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us



Quote:
Date: Thu, 13 Oct 2016 09:37:34 -0400
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
        <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
        <CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gmail.com (CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gmail.com)>
Content-Type: text/plain; charset="utf-8"

What do you get when you do:
cat /proc/<PID OF ASTERISK>/limits ?

On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:
Hi all,

Now a days getting openfile issues on asterisk quite often even setting
system  soft limit to 20000 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     IP        IPv6

*         758       -         -

RAW       0         0         0

UDP       422       419       3

TCP       15        14        1

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-0000062a] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket

[2016-10-13 08:18:41] ERROR[50689][C-00000629] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50689][C-00000629] acl.c: Cannot create socket

[2016-10-13 08:18:40] ERROR[49913][C-000005b7] 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-0000059c] 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161013/dd80ddc4/attachment.html>

------------------------------

_______________________________________________
--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

End of asterisk-users Digest, Vol 147, Issue 11
***********************************************



--
Regards,

Ahmed Munir Chohan
Back to top
dovid at telecurve.com
Guest





PostPosted: Thu Oct 13, 2016 9:20 am    Post subject: [asterisk-users] Openfile Issue Reply with quote

Strange. What's the output of:lsof -u <USER RUNNING ASTERISK> | 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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:

See below;

[root@abc asterisk]# cat /proc/50771/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             256389               256389               processes
Max open files            20000                25000                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       256389               256389               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us



Quote:
Date: Thu, 13 Oct 2016 09:37:34 -0400
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
        <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
        <CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gmail.com (CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gmail.com)>
Content-Type: text/plain; charset="utf-8"

What do you get when you do:
cat /proc/<PID OF ASTERISK>/limits ?

On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:
Hi all,

Now a days getting openfile issues on asterisk quite often even setting
system  soft limit to 20000 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     IP        IPv6

*         758       -         -

RAW       0         0         0

UDP       422       419       3

TCP       15        14        1

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-0000062a] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create socket

[2016-10-13 08:18:41] ERROR[50689][C-00000629] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50689][C-00000629] acl.c: Cannot create socket

[2016-10-13 08:18:40] ERROR[49913][C-000005b7] 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-0000059c] 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161013/dd80ddc4/attachment.html>

------------------------------

_______________________________________________
--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

End of asterisk-users Digest, Vol 147, Issue 11
***********************************************



--
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
Back to top
ahmedmunir007 at gmail...
Guest





PostPosted: Thu Oct 13, 2016 12:32 pm    Post subject: [asterisk-users] Openfile Issue Reply with quote

[root@abc asterisk]# lsof -u 50771 | wc -l
0

BTW, I'm using CentOS 6.5


Quote:


Quote:
Date: Thu, 13 Oct 2016 10:20:19 -0400
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
        <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
        <CAM3TTh1yvoHmRUBb=EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com (EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com)>
Content-Type: text/plain; charset="utf-8"

Strange. What's the output of:
lsof -u <USER RUNNING ASTERISK> | 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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:

See below;

[root@abc asterisk]# cat /proc/50771/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             256389               256389
processes
Max open files            20000                25000                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       256389               256389               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us


Date: Thu, 13 Oct 2016 09:37:34 -0400
Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
         <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
         <CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm (CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm)
ail.com>
Content-Type: text/plain; charset="utf-8"

What do you get when you do:
cat /proc/<PID OF ASTERISK>/limits ?

On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:







--
Regards,

Ahmed Munir Chohan
Back to top
dovid at telecurve.com
Guest





PostPosted: Thu Oct 13, 2016 12:54 pm    Post subject: [asterisk-users] Openfile Issue Reply with quote

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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)> wrote:
Quote:

[root@abc asterisk]# lsof -u 50771 | wc -l
0

BTW, I'm using CentOS 6.5


Quote:


Quote:
Date: Thu, 13 Oct 2016 10:20:19 -0400
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
        <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
        <CAM3TTh1yvoHmRUBb=EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com (EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com)>
Content-Type: text/plain; charset="utf-8"

Strange. What's the output of:
lsof -u <USER RUNNING ASTERISK> | 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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:

See below;

[root@abc asterisk]# cat /proc/50771/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             256389               256389
processes
Max open files            20000                25000                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       256389               256389               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us


Date: Thu, 13 Oct 2016 09:37:34 -0400
Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
         <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
         <CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm (CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm)
ail.com>
Content-Type: text/plain; charset="utf-8"

What do you get when you do:
cat /proc/<PID OF ASTERISK>/limits ?

On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:







--
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
Back to top
asterisk.org at sedwar...
Guest





PostPosted: Thu Oct 13, 2016 2:11 pm    Post subject: [asterisk-users] Openfile Issue Reply with quote

On Thu, 13 Oct 2016, Dovid Bender wrote:

Quote:
50771 is the PID. I am talking about the user. for instances if running
as root (which you should never do) then:

Quote:
 lsof -u root | wc -l

Wouldn't

sudo lsof -c asterisk | wc --lines

be more direct and accurate?

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@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
Back to top
ahmedmunir007 at gmail...
Guest





PostPosted: Fri Oct 14, 2016 8:06 am    Post subject: [asterisk-users] Openfile Issue Reply with quote

See below;

[root@abc asterisk]# lsof -u 50771 | wc -l
0


BTW, I'm using CentOS 6.5 
Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
Quote:
To: Asterisk Users Mailing List - Non-Commercial Discussion
        <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
        <CAM3TTh1yvoHmRUBb=EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com (EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gmail.com)>
Content-Type: text/plain; charset="utf-8"

Strange. What's the output of:
lsof -u <USER RUNNING ASTERISK> | 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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:

See below;

[root@abc asterisk]# cat /proc/50771/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             256389               256389
processes
Max open files            20000                25000                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       256389               256389               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us


Date: Thu, 13 Oct 2016 09:37:34 -0400
Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
         <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
         <CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm (CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm)
ail.com>
Content-Type: text/plain; charset="utf-8"

What do you get when you do:
cat /proc/<PID OF ASTERISK>/limits ?

On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:
Hi all,

Now a days getting openfile issues on asterisk quite often even setting
system  soft limit to 20000 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
Quote:
14



Transport Total     IP        IPv6

*         758       -         -

RAW       0         0         0

UDP       422       419       3

TCP       15        14        1

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-0000062a] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create
socket
Quote:

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50690][C-0000062a] acl.c: Cannot create
socket
Quote:

[2016-10-13 08:18:41] ERROR[50689][C-00000629] res_timing_timerfd.c:
Failed to create timerfd timer: Too many open files

[2016-10-13 08:18:41] ERROR[50689][C-00000629] acl.c: Cannot create
socket
Quote:

[2016-10-13 08:18:40] ERROR[49913][C-000005b7] 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-0000059c] 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachment
s/20161013/dd80ddc4/attachment.html>

------------------------------

_______________________________________________
--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

End of asterisk-users Digest, Vol 147, Issue 11
***********************************************




--
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161013/a78838d3/attachment-0001.html>











--
Regards,

Ahmed Munir Chohan
Back to top
ahmedmunir007 at gmail...
Guest





PostPosted: Fri Oct 14, 2016 8:12 am    Post subject: [asterisk-users] Openfile Issue Reply with quote

See below output;

[root@abc ~]#  lsof -u root | wc -l
5116



Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
        <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
        <CAM3TTh3QA3AqrNNGC1GuSHPGzW1-hGtRPg5hByM1QpBvGcb1Yg@mail.gmail.com (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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:

[root@abc asterisk]# lsof -u 50771 | wc -l
0

BTW, I'm using CentOS 6.5



Quote:

Date: Thu, 13 Oct 2016 10:20:19 -0400
Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
         <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
         <CAM3TTh1yvoHmRUBb=EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gm (EJbEb-HMmni-5ExKDCUMgQhnAeGF70qOA@mail.gm)
ail.com>
Content-Type: text/plain; charset="utf-8"

Strange. What's the output of:
lsof -u <USER RUNNING ASTERISK> | 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 <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)>
wrote:

Quote:

See below;

[root@abc asterisk]# cat /proc/50771/limits
Limit                     Soft Limit           Hard Limit
  Units
Quote:
Max cpu time              unlimited            unlimited
seconds
Quote:
Max file size             unlimited            unlimited
bytes
Quote:
Max data size             unlimited            unlimited
bytes
Quote:
Max stack size            10485760             unlimited
bytes
Quote:
Max core file size        unlimited            unlimited
bytes
Quote:
Max resident set          unlimited            unlimited
bytes
Quote:
Max processes             256389               256389
processes
Max open files            20000                25000
files
Quote:
Max locked memory         65536                65536
bytes
Quote:
Max address space         unlimited            unlimited
bytes
Quote:
Max file locks            unlimited            unlimited
locks
Quote:
Max pending signals       256389               256389
  signals
Quote:
Max msgqueue size         819200               819200
  bytes
Quote:
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us


Date: Thu, 13 Oct 2016 09:37:34 -0400
Quote:
From: Dovid Bender <dovid@telecurve.com (dovid@telecurve.com)>
To: Asterisk Users Mailing List - Non-Commercial Discussion
         <asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)>
Subject: Re: [asterisk-users] Openfile Issue
Message-ID:
         <CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm (CAM3TTh2ykzifYwjoqF1EZkn9qRuVLHLi38cMPP6UxJsqcK4pQg@mail.gm)
ail.com>
Content-Type: text/plain; charset="utf-8"

What do you get when you do:
cat /proc/<PID OF ASTERISK>/limits ?

On Thu, Oct 13, 2016 at 9:30 AM, Ahmed Munir <ahmedmunir007@gmail.com (ahmedmunir007@gmail.com)

Quote:
wrote:


--
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161013/68e2c291/attachment-0001.html>



--
Regards,

Ahmed Munir Chohan
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services