From a4f675c6324eee8137697bf9baa30be1c120cbaf Mon Sep 17 00:00:00 2001 From: Binyamin Yawitz <316103+byawitz@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:16:44 -0400 Subject: [PATCH] feat: Coroutine adjustments --- .env | 2 +- app/http.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.env b/.env index 4e211a95b7..23d221d0d6 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ _APP_ENV=development _APP_EDITION=self-hosted _APP_LOCALE=en -_APP_WORKER_PER_CORE=4 +_APP_WORKER_PER_CORE=6 _APP_CONSOLE_WHITELIST_ROOT=disabled _APP_CONSOLE_WHITELIST_EMAILS= _APP_CONSOLE_WHITELIST_IPS= diff --git a/app/http.php b/app/http.php index 5b0d2b5c9e..5ae2e40e1a 100644 --- a/app/http.php +++ b/app/http.php @@ -26,7 +26,7 @@ use Utopia\System\System; global $global, $container; $payloadSize = 12 * (1024 * 1024); // 12MB - adding slight buffer for headers and other data that might be sent with the payload - update later with valid testing -$workerNumber = swoole_cpu_num() * intval(System::getEnv('_APP_WORKER_PER_CORE', 4)); +$workerNumber = swoole_cpu_num() * intval(System::getEnv('_APP_WORKER_PER_CORE', 6)); $server = new Server('0.0.0.0', '80', [ 'open_http2_protocol' => true, @@ -34,13 +34,6 @@ $server = new Server('0.0.0.0', '80', [ 'http_compression_level' => 6, 'package_max_length' => $payloadSize, 'buffer_output_size' => $payloadSize, - - // TCP Keep-Alive check - 'open_tcp_keepalive' => true, - 'tcp_keepidle' => 4, - 'tcp_keepinterval' => 1, - 'tcp_keepcount' => 5, - // Server // 'log_level' => 0, 'dispatch_mode' => 1,