summaryrefslogtreecommitdiff
path: root/main/cdr.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-06-03 11:35:49 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-06-09 10:32:07 -0500
commitdcfef53ee2339d09f839aa4e333419b80b309d8a (patch)
tree76193b7e1f9251bdce3aba0c2e57b270794ab797 /main/cdr.c
parent4879cd875c932817c8259934814dd18cf15f5a1c (diff)
stasis: Add setting subscription congestion levels.
Stasis subscriptions and message routers create taskprocessors to process the event messages. API calls are needed to be able to set the congestion levels of these taskprocessors for selected subscriptions and message routers. * Updated CDR, CEL, and manager's stasis subscription congestion levels based upon stress testing. Increased the congestion levels to reduce the potential for bursty call setup/teardown activity from triggering the taskprocessor overload alert. CDRs in particular need an extra high congestion level because they can take awhile to process the stasis messages. ASTERISK-26088 Reported by: Richard Mudgett Change-Id: Id0a716394b4eee746dd158acc63d703902450244
Diffstat (limited to 'main/cdr.c')
-rw-r--r--main/cdr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/cdr.c b/main/cdr.c
index b43e3610c..3ddf55b6b 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -71,6 +71,7 @@ ASTERISK_REGISTER_FILE()
#include "asterisk/stasis_bridges.h"
#include "asterisk/stasis_message_router.h"
#include "asterisk/astobj2.h"
+#include "asterisk/taskprocessor.h"
/*** DOCUMENTATION
<configInfo name="cdr" language="en_US">
@@ -4221,6 +4222,8 @@ int ast_cdr_engine_init(void)
if (!stasis_router) {
return -1;
}
+ stasis_message_router_set_congestion_limits(stasis_router, -1,
+ 10 * AST_TASKPROCESSOR_HIGH_WATER_LEVEL);
if (STASIS_MESSAGE_TYPE_INIT(cdr_sync_message_type)) {
return -1;