diff --git a/app/http.php b/app/http.php index 40faabae30..069767f821 100644 --- a/app/http.php +++ b/app/http.php @@ -5,6 +5,7 @@ require_once __DIR__ . '/../vendor/autoload.php'; use Appwrite\Utopia\Request; use Appwrite\Utopia\Response; use Swoole\Process; +use Swoole\Runtime; use Utopia\Abuse\Adapters\TimeLimit; use Utopia\Audit\Audit; use Utopia\CLI\Console; @@ -22,6 +23,11 @@ use Utopia\Pools\Group; $payloadSize = 6 * (1024 * 1024); // 6MB $workerNumber = swoole_cpu_num() * intval(Http::getEnv('_APP_WORKER_PER_CORE', 6)); +// Unlimited memory limit to handle as many coroutines/requests as possible +ini_set('memory_limit', '-1'); + +Runtime::enableCoroutine(true, SWOOLE_HOOK_ALL); + include __DIR__ . '/controllers/general.php'; $http = new Http(new Server('0.0.0.0', Http::getEnv('PORT', 80), [