diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 6b185ddd4c..7965fa0777 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -92,7 +92,7 @@ SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs; #define SWITCH_MAX_STATE_HANDLERS 30 #define SWITCH_TRUE 1 #define SWITCH_FALSE 0 - +#define SWITCH_CORE_QUEUE_LEN 20000 typedef enum { SWITCH_XML_SECTION_RESULT = 0, diff --git a/src/switch_event.c b/src/switch_event.c index 4c60452414..f6a2734bc5 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -40,7 +40,7 @@ static switch_memory_pool_t *RUNTIME_POOL = NULL; //static switch_memory_pool_t *BPOOL = NULL; static switch_memory_pool_t *THRUNTIME_POOL = NULL; static switch_queue_t *EVENT_QUEUE[3] = {0,0,0}; -static int POOL_COUNT_MAX = 2000; +static int POOL_COUNT_MAX = SWITCH_CORE_QUEUE_LEN; static switch_hash_t *CUSTOM_HASH = NULL; static int THREAD_RUNNING = 0; diff --git a/src/switch_log.c b/src/switch_log.c index 9276b2cd89..0938ff8e8a 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -263,7 +263,7 @@ SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool) switch_threadattr_detach_set(thd_attr, 1); - switch_queue_create(&LOG_QUEUE, 2000, LOG_POOL); + switch_queue_create(&LOG_QUEUE, SWITCH_CORE_QUEUE_LEN, LOG_POOL); switch_mutex_init(&BINDLOCK, SWITCH_MUTEX_NESTED, LOG_POOL); switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE); switch_thread_create(&thread, thd_attr, log_thread, NULL, LOG_POOL);