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());
|
||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
// current release version
|
||||
#define VERSION_MAJOR "0"
|
||||
#define VERSION_MINOR "9"
|
||||
#define VERSION_REVISION "208"
|
||||
#define VERSION_REVISION "209"
|
||||
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
|
||||
// server info.
|
||||
#define RTMP_SIG_SRS_KEY "SRS"
|
||||
|
|
|
@ -87,6 +87,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#define ERROR_SYSTEM_CREATE_PIPE 1048
|
||||
#define ERROR_SYSTEM_FILE_SEEK 1049
|
||||
#define ERROR_SYSTEM_IO_INVALID 1050
|
||||
#define ERROR_ST_EXCEED_THREADS 1051
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// RTMP protocol error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue