Disable memory limit before performing a mem dump

Fix memory dumps not completing due to exhausting available memory
This commit is contained in:
Dylan K. Taylor 2017-04-28 16:53:05 +01:00
parent 653b6b55a9
commit b542277eca

View File

@ -214,6 +214,8 @@ class MemoryManager{
}
public function dumpServerMemory($outputFolder, $maxNesting, $maxStringSize){
$hardLimit = ini_get('memory_limit');
ini_set('memory_limit', -1);
gc_disable();
if(!file_exists($outputFolder)){
@ -300,6 +302,7 @@ class MemoryManager{
echo "[Dump] Finished!\n";
ini_set('memory_limit', $hardLimit);
gc_enable();
}