mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
max connections is 32756, for st use mmap default. 0.9.209
This commit is contained in:
parent
839101a036
commit
d0c585af86
4 changed files with 13 additions and 3 deletions
|
@ -545,8 +545,6 @@ int SrsServer::initialize_st()
|
|||
}
|
||||
srs_verbose("st_set_eventsys use linux epoll success");
|
||||
|
||||
// @remark, st alloc segment use mmap, which only support 32757 threads,
|
||||
// if need to support more, for instance, 100k threads, define the macro MALLOC_STACK.
|
||||
if(st_init() != 0){
|
||||
ret = ERROR_ST_INITIALIZE;
|
||||
srs_error("st_init failed. ret=%d", ret);
|
||||
|
@ -554,6 +552,16 @@ int SrsServer::initialize_st()
|
|||
}
|
||||
srs_verbose("st_init success");
|
||||
|
||||
// @remark, st alloc segment use mmap, which only support 32757 threads,
|
||||
// if need to support more, for instance, 100k threads, define the macro MALLOC_STACK.
|
||||
if (_srs_config->get_max_connections() > 32756) {
|
||||
ret = ERROR_ST_EXCEED_THREADS;
|
||||
srs_error("st mmap for stack allocation must <= %d threads, "
|
||||
"@see Makefile of st for MALLOC_STACK, please build st manually by "
|
||||
"\"make EXTRA_CFLAGS=-DMALLOC_STACK linux-debug\", ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// set current log id.
|
||||
_srs_context->generate_id();
|
||||
srs_trace("server main cid=%d", _srs_context->get_id());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue