summaryrefslogtreecommitdiff
path: root/res/res_pjsip
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-11-02 17:19:21 -0600
committerMark Michelson <mmichelson@digium.com>2015-11-02 18:24:09 -0500
commitf80a0ae49be93c654a1da156d4e1a9858cb3223a (patch)
tree6057de203ca2b257eb4d071376cd61e148dd78f3 /res/res_pjsip
parent1eeef9ea045598f47a2004c010a1c570c538b41e (diff)
res_pjsip: Set threadpool max size default to 50.
During a stress test of subscriptions, a huge blast of subscription-related traffic resulted in the threadpool expanding to a ridiculous number of threads. The balooning of threads resulted in an increase of memory, which led to a crash due to being out of memory. An easy fix for the particular test was to limit the size of the threadpool, thus reining in the amount of memory that would be used. It was decided that there really is no downside to having a non-infinite default value for the maximum size of the threadpool, so this change introduces 50 threads as the maximum threadpool size for the SIP threadpool. ASTERISK-25513 #close Reported by John Bigelow Change-Id: If0b9514f1d9b172540ce1a6e2f2ffa1f2b6119be
Diffstat (limited to 'res/res_pjsip')
-rw-r--r--res/res_pjsip/config_system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip/config_system.c b/res/res_pjsip/config_system.c
index 473eca818..dfd92404b 100644
--- a/res/res_pjsip/config_system.c
+++ b/res/res_pjsip/config_system.c
@@ -180,7 +180,7 @@ int ast_sip_initialize_system(void)
OPT_UINT_T, 0, FLDSET(struct system_config, threadpool.auto_increment));
ast_sorcery_object_field_register(system_sorcery, "system", "threadpool_idle_timeout", "60",
OPT_UINT_T, 0, FLDSET(struct system_config, threadpool.idle_timeout));
- ast_sorcery_object_field_register(system_sorcery, "system", "threadpool_max_size", "0",
+ ast_sorcery_object_field_register(system_sorcery, "system", "threadpool_max_size", "50",
OPT_UINT_T, 0, FLDSET(struct system_config, threadpool.max_size));
ast_sorcery_object_field_register(system_sorcery, "system", "disable_tcp_switch", "yes",
OPT_BOOL_T, 1, FLDSET(struct system_config, disable_tcp_switch));