1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Server crashing, "Allowed memory size of ... bytes exhausted"

Discussion in 'Help' started by WinterBuild7074, Apr 22, 2017.

  1. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    My server is crashing almost everyday at night, this is my crashdump I always get:

    Code:
    Error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes)
    File: /src/pocketmine/utils/Utils
    Line: 208
    Type: E_ERROR
    
    Code:
    [199]         return self::$os;
    [200]     }
    [201]
    [202]
    [203]     public static function getRealMemoryUsage(){
    [204]         $stack = 0;
    [205]         $heap = 0;
    [206]
    [207]         if(Utils::getOS() === "linux" or Utils::getOS() === "android"){
    [208]             $mappings = file("/proc/self/maps");
    [209]             foreach($mappings as $line){
    [210]                 if(preg_match("#([a-z0-9]+)\\-([a-z0-9]+) [rwxp\\-]{4} [a-z0-9]+ [^\\[]*\\[([a-zA-z0-9]+)\\]#", trim($line), $matches) > 0){
    [211]                     if(strpos($matches[3], "heap") === 0){
    [212]                         $heap += hexdec($matches[2]) - hexdec($matches[1]);
    [213]                     }elseif(strpos($matches[3], "stack") === 0){
    [214]                         $stack += hexdec($matches[2]) - hexdec($matches[1]);
    [215]                     }
    [216]                 }
    [217]             }
    [218]         }
    I'm using the api3/network branch PocketMine-MP. Link to .phar

    Code:
    PocketMine-MP version: 1.6.2dev #0 [Protocol 107; API 3.0.0-ALPHA5]
    Git commit: 0000000000000000000000000000000000000000
    uname -a: Linux infinity-pe.ga 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64
    PHP Version: 7.0.3
    Zend version: 3.0.0
    OS : Linux, linux
     
    MyNET likes this.
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    plugin list? is something keep calling that function?
     
  3. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Code:
    Loaded plugins:
    ImagicalDevTools 2.1.1 by PocketMine Team and modyfied by DarkWav for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    BanItem 2.2 by LDX for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    NetherChests 1.1.1 by aliuly for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    ManyWorlds 2.0.3 by aliuly for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    SkyWarsDoDo 1.0.0 Reloaded_ENGLISH by KaitoDoDo for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    PurePerms 1.3.7 by 64FF00 & ProjectInfinity for API(s) 1.13.0, 2.0.0, 3.0.0-ALPHA5
    Parkour 3 by Driesboy for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    ServerAuth 2.13 by EvolSoft for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    ItemBlocker 1.0.0 by WinterBuild for API(s) 3.0.0-ALPHA5
    VoteReward 3.0.2 by LDX for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    TimerBan 2.1 by onebone for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    iProtector 3.1b by LDX for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    ChatDefender 1.1.1 by Falkirks for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    TapToDo 2.2.1 by Falk for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    SignPortal 1.1.2 by 99leonchang for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    SexyMOTD 1.0.0 by hoyinm14mc for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    BuyCraft 1.2.2 by Falkirks for API(s) 3.0.0, 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5
    EssentialsPE 2.0.0 by LegendsOfMCPE Team for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    EconomyJob 2.0.4 by onebone for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    Slapper 1.3.3 by jojoe77777 for API(s) 3.0.0-ALPHA5
    EconomyAPI 2.0.9 by onebone for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    WordGuess 1.0.0 by WinterBuild for API(s) 3.0.0-ALPHA5
    MagicWE 0.2.6 by thebigsmileXD for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    ChatToolsPro 1.1 by paetti for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    DevTools 1.11.1 by PocketMine Team for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    Broadcaster 1.16 by EvolSoft for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    EconomyChat 1.0.0 by WinterBuild for API(s) 3.0.0-ALPHA5
    InfinityInfos 1.0.1 by DuengonZocker for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    EconomyShop 2.0.7 by onebone for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    EconomySell 2.0.7 by onebone for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    MyPlot 1.1.3 by Wiez, Exxarion, jasonwynn10 for API(s) 2.0.0, 1.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0
    PureChat 1.4.0-BETA-05 by 64FF00 for API(s) 1.13.0, 2.0.0, 3.0.0-ALPHA5
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    is there a call stack?
    i think that would be better at determining the culprit then handpicking it
    sidenote wow there's so much API version spamming ongoing
     
    HimbeersaftLP likes this.
  5. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    I don't know what you mean with a call stack. Explain.
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    copy the FULL crash log and paste onto https://ghostbin.com/ ?
    it basically shows who called that function
     
  7. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    https://ghostbin.com/paste/pr5ve

    There's not much more. I already pasted the whole crashdump here, except the part with with hundreds of random letters and numbers. I have no idea what that should mean.
     
  8. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    this should decode the mess
    DevTools/crashdump/
    the backtrace seems to be blank
    when does the error occurred?
     
  9. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    I don't know. The server suddenly crashes.
     
  10. Primus

    Primus Zombie Pigman

    Messages:
    749
    Memory leak or something. Just restart server more often!
     
    Sandertv likes this.
  11. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    How can I restart my server automatically maybe every 30 minutes? Is there a plugin for that?
     
  12. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    That is no solution to the problem. It is like hiding that there is a problem.
     
  13. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    And now? I don't want my server to crash in the middle of the night and my players will be annoyed what is happening. There must be a way to fix this.
     
  14. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    maybe just disable the function by returning fake data which is hacky in it's own ways
     
  15. Laz

    Laz Silverfish

    Messages:
    23
    set main-hard-limit to 0 in pocketmine.yml, thanks me later :)
     
  16. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    but then it would just use up all the avaliable ram and get killed too!
     
  17. Laz

    Laz Silverfish

    Messages:
    23
    So, He must enter the configured ram number on the server in the main-hard-limit, and set slots recommended with RAM for no crash.
     
  18. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Shall I really set it to 0? Or can I double it from 1024 to 2048?
     
  19. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    again, it's just hiding the problem again
    mind if i ask you how you setup your PMMP instance to run as long as you wish?
    you could create a script that auto restarts it
     
  20. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    What shall I change now? The main-hard-limit or shall I add an auto-restarter?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.