mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 21:05:12 +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){
|
public function dumpServerMemory($outputFolder, $maxNesting, $maxStringSize){
|
||||||
|
$hardLimit = ini_get('memory_limit');
|
||||||
|
ini_set('memory_limit', -1);
|
||||||
gc_disable();
|
gc_disable();
|
||||||
|
|
||||||
if(!file_exists($outputFolder)){
|
if(!file_exists($outputFolder)){
|
||||||
@ -300,6 +302,7 @@ class MemoryManager{
|
|||||||
|
|
||||||
echo "[Dump] Finished!\n";
|
echo "[Dump] Finished!\n";
|
||||||
|
|
||||||
|
ini_set('memory_limit', $hardLimit);
|
||||||
gc_enable();
|
gc_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user