Merge pull request #8099 from appwrite/feat-increase-chunk-size-to-10-MB
Increase chunk size to 10 MB
This commit is contained in:
commit
7bb5ce9cb6
|
@ -32,7 +32,7 @@ $http = new Server(
|
|||
mode: SWOOLE_PROCESS,
|
||||
);
|
||||
|
||||
$payloadSize = 6 * (1024 * 1024); // 6MB
|
||||
$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', 6));
|
||||
|
||||
$http
|
||||
|
|
|
@ -203,7 +203,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 = 2 * 1024 * 1024; // 2MB
|
||||
const MAX_OUTPUT_CHUNK_SIZE = 10 * 1024 * 1024; // 10MB
|
||||
// Function headers
|
||||
const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host'];
|
||||
const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length'];
|
||||
|
|
|
@ -125,11 +125,11 @@ trait StorageBase
|
|||
|
||||
/**
|
||||
* Failure
|
||||
* Test for Chunk above 5MB
|
||||
* Test for Chunk above 10MB
|
||||
*/
|
||||
$source = __DIR__ . "/../../../resources/disk-a/large-file.mp4";
|
||||
$totalSize = \filesize($source);
|
||||
$chunkSize = 6 * 1024 * 1024;
|
||||
$chunkSize = 12 * 1024 * 1024;
|
||||
$handle = @fopen($source, "rb");
|
||||
$fileId = 'unique()';
|
||||
$mimeType = mime_content_type($source);
|
||||
|
|
Loading…
Reference in a new issue