1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

feat: update worker counts

This commit is contained in:
Christy Jacob 2022-11-22 21:07:04 +05:30
parent 85de5e9106
commit c7f2785b45
2 changed files with 4 additions and 4 deletions

2
.env
View file

@ -1,6 +1,6 @@
_APP_ENV=development
_APP_LOCALE=en
_APP_WORKER_PER_CORE=6
_APP_WORKER_PER_CORE=3
_APP_CONSOLE_WHITELIST_ROOT=disabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=

View file

@ -552,10 +552,10 @@ $register->set('pools', function () {
],
];
$maxConnections = App::getenv('_APP_CONNECTIONS_MAX', 151);
$instanceConnections = $maxConnections / App::getenv('_APP_POOL_CLIENTS', 14);
$maxConnections = App::getEnv('_APP_CONNECTIONS_MAX', 151);
$instanceConnections = $maxConnections / App::getEnv('_APP_POOL_CLIENTS', 14);
$multiprocessing = App::getenv('_APP_SERVER_MULTIPROCESS', 'disabled') === 'enabled';
$multiprocessing = App::getEnv('_APP_SERVER_MULTIPROCESS', 'disabled') === 'enabled';
if ($multiprocessing) {
$workerCount = swoole_cpu_num() * intval(App::getEnv('_APP_WORKER_PER_CORE', 6));