mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Disable memory limit before performing a mem dump
Fix memory dumps not completing due to exhausting available memory
This commit is contained in:
parent
653b6b55a9
commit
b542277eca
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user