Michaël Gaudette
2017-Apr-01 01:55 UTC
[asterisk-users] Issue with Asterisk 13, multiple CDR per queue and arbitrary upper limit
Hi, I`ve recently upgraded a server from 1.8 to Asterisk 13. While everything is under control, I have one issue with the way CDRs are kept for queues. And I don`t mean ?I don`t like it?. I mean it crashes the server. I realize there are multiple CDRs per queue call ? one per ring/per phone, basically. The issue is that whenever the number of CDRs ?to be recorded? for a call exceeds 5000, Asterisk becomes unresponsive for a few minute. I get this message in the console: ?taskprocessor_push: The 'subm:cdr_engine-00000003' task processor queue reached 5000 scheduled tasks again.? This scenario is trivial to reproduce: a queue, with simultaneous ring, 20 phones, all unreachable, 1 second between attempts. After 250 (5000 divided by 20) seconds of waiting asterisk partially breaks down. This seems to be because while multiple CDR`s are written per queue call, it`s only done at the end of the call, so CDRs accumulate in memory/cacher/whatever and break some limit. So, my question is: is there any way to force the CDR`s to be written as the queue app is working it`s magic, instead of at the very end of the call? Or anyway to work around this limit? Or any fix for this? Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170331/9c2ec4fe/attachment.html>
Joshua Colp
2017-Apr-01 10:56 UTC
[asterisk-users] Issue with Asterisk 13, multiple CDR per queue and arbitrary upper limit
On Fri, Mar 31, 2017, at 10:55 PM, Micha?l Gaudette wrote:> > > Hi, > > > > I`ve recently upgraded a server from 1.8 to Asterisk 13. While > everything > is under control, I have one issue with the way CDRs are kept for queues. > And I don`t mean ?I don`t like it?. I mean it crashes the server. > > > > I realize there are multiple CDRs per queue call ? one per ring/per > phone, > basically. The issue is that whenever the number of CDRs ?to be > recorded? for a call exceeds 5000, Asterisk becomes unresponsive for a > few > minute. I get this message in the console: > > ?taskprocessor_push: The 'subm:cdr_engine-00000003' task processor queue > reached 5000 scheduled tasks again.? > > > > This scenario is trivial to reproduce: a queue, with simultaneous ring, > 20 > phones, all unreachable, 1 second between attempts. After 250 (5000 > divided by 20) seconds of waiting asterisk partially breaks down. > > > > This seems to be because while multiple CDR`s are written per queue call, > it`s only done at the end of the call, so CDRs accumulate in > memory/cacher/whatever and break some limit. > > > > So, my question is: is there any way to force the CDR`s to be written as > the queue app is working it`s magic, instead of at the very end of the > call? Or anyway to work around this limit? Or any fix for this?There is not. If you are running the latest version I'd suggest filing an issue[1] as we definitely should not crash under the scenario. [1] https://issues.asterisk.org/jira -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Michaël Gaudette
2017-Apr-02 17:45 UTC
[asterisk-users] Issue with Asterisk 13, multiple CDR per queue and arbitrary upper limit
Joshua, After playing with this issue I'm starting to think this has little to do with the 5000 limit - at least not directly. The amount of CDR entries to be written to the DB is just too high for either Asterisk or the Database to keep up, and it possibly creates issues around DB access (on which my Asterisk dialplan relies). Is there any way to "slow down" the writing of all the CDR entries? Or, on the contrary, to have the CDR entries be flushed at every 100 "entries to be written" instead of 5000, so that the hit is relatively small? Regards, -------------------------------------------- Mike -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Joshua Colp Sent: April 1, 2017 6:56 AM To: asterisk-users at lists.digium.com Subject: Re: [asterisk-users] Issue with Asterisk 13, multiple CDR per queue and arbitrary upper limit On Fri, Mar 31, 2017, at 10:55 PM, Micha?l Gaudette wrote:> > > Hi, > > > > I`ve recently upgraded a server from 1.8 to Asterisk 13. While > everything > is under control, I have one issue with the way CDRs are kept for queues. > And I don`t mean ?I don`t like it?. I mean it crashes the server. > > > > I realize there are multiple CDRs per queue call ? one per ring/per > phone, > basically. The issue is that whenever the number of CDRs ?to be > recorded? for a call exceeds 5000, Asterisk becomes unresponsive for a > few > minute. I get this message in the console: > > ?taskprocessor_push: The 'subm:cdr_engine-00000003' task processor queue > reached 5000 scheduled tasks again.? > > > > This scenario is trivial to reproduce: a queue, with simultaneous ring, > 20 > phones, all unreachable, 1 second between attempts. After 250 (5000 > divided by 20) seconds of waiting asterisk partially breaks down. > > > > This seems to be because while multiple CDR`s are written per queue call, > it`s only done at the end of the call, so CDRs accumulate in > memory/cacher/whatever and break some limit. > > > > So, my question is: is there any way to force the CDR`s to be written as > the queue app is working it`s magic, instead of at the very end of the > call? Or anyway to work around this limit? Or any fix for this?There is not. If you are running the latest version I'd suggest filing an issue[1] as we definitely should not crash under the scenario. [1] https://issues.asterisk.org/jira -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ 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