diff --git a/.env b/.env index 3406ba1004..8c8f1673a1 100644 --- a/.env +++ b/.env @@ -33,7 +33,7 @@ _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_CONTAINERS=10 _APP_FUNCTIONS_CPUS=1 _APP_FUNCTIONS_MEMORY=128 -_APP_FUNCTIONS_MEMORY_SWAP=128 +_APP_FUNCTIONS_MEMORY_SWAP=256 _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 _APP_MAINTENANCE_RETENTION_ABUSE=86400 diff --git a/app/config/variables.php b/app/config/variables.php index 8f00a78b0f..653a82f74e 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -349,7 +349,7 @@ return [ 'name' => '_APP_FUNCTIONS_MEMORY_SWAP', 'description' => 'The maximum amount of swap memory a single cloud function is allowed to use in megabytes. The default value is 128.', 'introduction' => '0.7.0', - 'default' => '128', + 'default' => '256', 'required' => false, 'question' => '', ], diff --git a/app/workers/functions.php b/app/workers/functions.php index 9b179969dc..115cd16fac 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -363,7 +363,7 @@ class FunctionsV1 " --entrypoint=\"\"". " --cpus=".App::getEnv('_APP_FUNCTIONS_CPUS', '1'). " --memory=".App::getEnv('_APP_FUNCTIONS_MEMORY', '128')."m". - " --memory-swap=".App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', '128')."m". + " --memory-swap=".App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', '256')."m". " --name={$container}". " --label appwrite-type=function". " --label appwrite-created={$executionTime}". diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index c1177d1fbb..6a19057407 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -535,14 +535,14 @@ class FunctionsCustomServerTest extends Scope 'command' => 'deno run --allow-env index.ts', 'timeout' => 15, ], - /*[ + [ 'language' => 'Dart', 'version' => '2.10', 'name' => 'dart-2.10', 'code' => $functions.'/dart.tar.gz', - 'command' => 'dart run main.dart', + 'command' => 'dart main.dart', 'timeout' => 15, - ],*/ + ], [ 'language' => '.NET', 'version' => '3.1',