From: Pierangelo Masarati Date: Wed, 7 Dec 2005 09:58:54 +0000 (+0000) Subject: warn if "excessive" thread number is set (ITS#4249) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~629 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=47b4f993631ac8290f480c6704013ca131bf4261;p=openldap warn if "excessive" thread number is set (ITS#4249) --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 4c94997920..8c13563ca5 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -1069,6 +1069,13 @@ config_generic(ConfigArgs *c) { break; case CFG_THREADS: + if ( c->value_int > 2 * SLAP_MAX_WORKER_THREADS ) { + snprintf( c->msg, sizeof( c->msg ), + "warning, threads=%d larger than twice the default (2*%d=%d); YMMV", + c->value_int, SLAP_MAX_WORKER_THREADS, 2 * SLAP_MAX_WORKER_THREADS ); + Debug(LDAP_DEBUG_ANY, "%s: %s.\n", + c->log, c->msg, 0 ); + } if ( slapMode & SLAP_SERVER_MODE ) ldap_pvt_thread_pool_maxthreads(&connection_pool, c->value_int); connection_pool_max = c->value_int; /* save for reference */