stream: improve error handling of ssn pool

With large number of threads the default memcap leads to pool setup
failures. Make sure these are reported properly so that the user
knows what is going on.

Bug: #2242
pull/2942/head
Victor Julien 7 years ago
parent b9e76ed1b6
commit 9fdecfffc1

@ -4973,8 +4973,10 @@ TmEcode StreamTcpThreadInit(ThreadVars *tv, void *initdata, void **data)
SCLogDebug("pool size %d, thread ssn_pool_id %d", PoolThreadSize(ssn_pool), stt->ssn_pool_id);
}
SCMutexUnlock(&ssn_pool_mutex);
if (stt->ssn_pool_id < 0 || ssn_pool == NULL)
if (stt->ssn_pool_id < 0 || ssn_pool == NULL) {
SCLogError(SC_ERR_MEM_ALLOC, "failed to setup/expand stream session pool. Expand stream.memcap?");
SCReturnInt(TM_ECODE_FAILED);
}
SCReturnInt(TM_ECODE_OK);
}

Loading…
Cancel
Save