feat: Coroutine adjustments

This commit is contained in:
Binyamin Yawitz 2024-07-02 11:16:44 -04:00
parent 77b593dae5
commit a4f675c632
No known key found for this signature in database
2 changed files with 2 additions and 9 deletions

2
.env
View file

@ -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=

View file

@ -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,