Reduce AsyncWorker default memory limit to 256MB

a worker shouldn't be using as much memory as the main server thread would, so 1024MB is extremely excessive.
This commit is contained in:
Dylan K. Taylor 2018-06-06 18:49:48 +01:00
parent 2b5e6b790f
commit 5f7c884255
2 changed files with 2 additions and 2 deletions

View File

@ -1526,7 +1526,7 @@ class Server{
$poolSize = (int) $poolSize;
}
$this->asyncPool = new AsyncPool($this, $poolSize, (int) max(-1, (int) $this->getProperty("memory.async-worker-hard-limit", 1024)));
$this->asyncPool = new AsyncPool($this, $poolSize, (int) max(-1, (int) $this->getProperty("memory.async-worker-hard-limit", 256)));
if($this->getProperty("network.batch-threshold", 256) >= 0){
Network::$BATCH_THRESHOLD = (int) $this->getProperty("network.batch-threshold", 256);

View File

@ -40,7 +40,7 @@ memory:
#AsyncWorker threads' hard memory limit in megabytes. Set to 0 to disable
#This will crash the task currently executing on the worker if the task exceeds the limit
#NOTE: THIS LIMIT APPLIES PER WORKER, NOT TO THE WHOLE PROCESS.
async-worker-hard-limit: 1024
async-worker-hard-limit: 256
#Period in ticks to check memory (default 1 second)
check-rate: 20