allow to adjust the PHP memory limit

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2022-11-09 21:25:10 +01:00
parent a1eac7dbbc
commit 588f9a36e7
8 changed files with 24 additions and 0 deletions

View file

@ -528,6 +528,13 @@ class ConfigurationManager
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function GetNextcloudMemoryLimit() : string {
$envVariableName = 'NEXTCLOUD_MEMORY_LIMIT';
$configName = 'nextcloud_memory_limit';
$defaultValue = '512M';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function GetApacheMaxSize() : int {
$uploadLimit = (int)rtrim($this->GetNextcloudUploadLimit(), 'G');
return $uploadLimit * 1024 * 1024 * 1024;