I've been having a memory leak I cant seem to find when my player base hits 60 server dies from raklib memory accessed So what is the best way to find a leak? What are some ways I can prevent this from happening again NOTE: I've tried timings
first of all how much memory do you have. how much do you have allocated to pmmp. and what version of pmmp are you using
Error: RakLib Thread crashed File: src/pocketmine/network/mcpe/RakLibInterface Line: 112 Type: Exception Code: [103] [104] public function setNetwork(Network $network){ [105] $this->network = $network; [106] } [107] [108] public function process() : void{ [109] while($this->interface->handlePacket()){} [110] [111] if(!$this->rakLib->isRunning() and !$this->rakLib->isShutdown()){ [112] throw new \Exception("RakLib Thread crashed"); [113] } [114] } [115] [116] public function closeSession(string $identifier, string $reason) : void{ [117] if(isset($this->players[$identifier])){ [118] $player = $this->players[$identifier]; [119] unset($this->identifiers[spl_object_hash($player)]); [120] unset($this->players[$identifier]); [121] unset($this->identifiersACK[$identifier]); [122] $player->close($player->getLeaveMessage(), $reason);
I have same problem with main-hard-limit set to 0 Exception: "RakLib Thread crashed" (EXCEPTION) in "src/pocketmine/network/mcpe/RakLibInterface" at line 112 https://forums.pmmp.io/threads/fatal-error-raklib-thread-crashed.7280/
thanks dylan https://github.com/pmmp/PocketMine-MP/issues/3052 dktapps commented yesterday This usually indicates that the RakLib instance doesn't have enough memory available. You need to modify your php.ini file and increase the memory_limit setting. If it's not there, add it something like memory_limit=1024M.