From 95300d796b7c7ae377a541f9a1a27856fa86ffb8 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 3 May 2024 10:19:03 +0400 Subject: [PATCH] Revert "Update chunk size to 7 MB" --- app/http.php | 2 +- app/init.php | 2 +- composer.lock | 2 +- tests/e2e/Services/Storage/StorageBase.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/http.php b/app/http.php index b0c6a76e69..c1b491056a 100644 --- a/app/http.php +++ b/app/http.php @@ -32,7 +32,7 @@ $http = new Server( mode: SWOOLE_PROCESS, ); -$payloadSize = 8 * (1024 * 1024); // 8MB +$payloadSize = 6 * (1024 * 1024); // 6MB $workerNumber = swoole_cpu_num() * intval(System::getEnv('_APP_WORKER_PER_CORE', 6)); $http diff --git a/app/init.php b/app/init.php index 44b2393359..9e5e0f5b0a 100644 --- a/app/init.php +++ b/app/init.php @@ -200,7 +200,7 @@ const APP_AUTH_TYPE_JWT = 'JWT'; const APP_AUTH_TYPE_KEY = 'Key'; const APP_AUTH_TYPE_ADMIN = 'Admin'; // Response related -const MAX_OUTPUT_CHUNK_SIZE = 7 * 1024 * 1024; // 7MB +const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB // Function headers const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host']; const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length']; diff --git a/composer.lock b/composer.lock index 5e51ea7528..9d4300f0a4 100644 --- a/composer.lock +++ b/composer.lock @@ -5529,5 +5529,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index 5a181072a1..78548ca1ac 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -125,11 +125,11 @@ trait StorageBase /** * Failure - * Test for Chunk above 7MB + * Test for Chunk above 5MB */ $source = __DIR__ . "/../../../resources/disk-a/large-file.mp4"; $totalSize = \filesize($source); - $chunkSize = 8 * 1024 * 1024; + $chunkSize = 6 * 1024 * 1024; $handle = @fopen($source, "rb"); $fileId = 'unique()'; $mimeType = mime_content_type($source);