Update env default max connections
This commit is contained in:
parent
af391b8f7a
commit
c4be0260c3
1 changed files with 1 additions and 1 deletions
|
@ -1133,7 +1133,7 @@ function getWorkerPoolSize(): int
|
||||||
{
|
{
|
||||||
$reservedConnections = APP_DEFAULT_POOL_SIZE; // Pool of default size is reserved for the HTTP API
|
$reservedConnections = APP_DEFAULT_POOL_SIZE; // Pool of default size is reserved for the HTTP API
|
||||||
$workerCount = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6));
|
$workerCount = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6));
|
||||||
$maxConnections = App::getenv('_APP_DB_MAX_CONNECTIONS', 1001);
|
$maxConnections = App::getenv('_APP_DB_MAX_CONNECTIONS', 251);
|
||||||
$workerConnections = $maxConnections - $reservedConnections;
|
$workerConnections = $maxConnections - $reservedConnections;
|
||||||
|
|
||||||
if ($workerCount > $workerConnections) {
|
if ($workerCount > $workerConnections) {
|
||||||
|
|
Loading…
Reference in a new issue