Enabled coroutines
This commit is contained in:
parent
a1db69b7e7
commit
bd57955168
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ require_once __DIR__ . '/../vendor/autoload.php';
|
||||||
use Appwrite\Utopia\Request;
|
use Appwrite\Utopia\Request;
|
||||||
use Appwrite\Utopia\Response;
|
use Appwrite\Utopia\Response;
|
||||||
use Swoole\Process;
|
use Swoole\Process;
|
||||||
|
use Swoole\Runtime;
|
||||||
use Utopia\Abuse\Adapters\TimeLimit;
|
use Utopia\Abuse\Adapters\TimeLimit;
|
||||||
use Utopia\Audit\Audit;
|
use Utopia\Audit\Audit;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
|
@ -22,6 +23,11 @@ use Utopia\Pools\Group;
|
||||||
$payloadSize = 6 * (1024 * 1024); // 6MB
|
$payloadSize = 6 * (1024 * 1024); // 6MB
|
||||||
$workerNumber = swoole_cpu_num() * intval(Http::getEnv('_APP_WORKER_PER_CORE', 6));
|
$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';
|
include __DIR__ . '/controllers/general.php';
|
||||||
|
|
||||||
$http = new Http(new Server('0.0.0.0', Http::getEnv('PORT', 80), [
|
$http = new Http(new Server('0.0.0.0', Http::getEnv('PORT', 80), [
|
||||||
|
|
Loading…
Reference in a new issue