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
    I don't know how to do that. :facepalm:
    What do I exactly need to do?
     
  2. Laz

    Laz Silverfish

    Messages:
    23
    set main-hard-limit to 0, man ...
     
    jasonwynn10 likes this.
  3. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    Are you sure? Or will it crash immediately if I do that?
     
  4. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    First try setting the memory limits in your PocketMine.yml to 0 to remove their limits
    If that doesn't solve your problem, download a plugin like TimeCommander to automatically restart your server
     
    WinterBuild7074 likes this.
  5. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    OK, if will not work, how can I add a restart command to TimerCommander?
     
  6. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    You can modify your start.sh file to automatically restart the server if it stops. Than set TimeCommander to do /stop at your desired times.
     
  7. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    What is now better? Editing the start.sh or TimeCommander? Or shall I use both?

    Plus, I don't know any shell coding, can you tell me what to add? It's only that my server will automatically restart.
     
  8. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    You have to edit the start.sh to make the thing with TimeCommander work.

    Because you will have to enable doLoop in start.sh which will make the server reboot when running /stop or when it crashes
     
    EdwardHamHam likes this.
  9. Laz

    Laz Silverfish

    Messages:
    23
    No need restart server, this crash no cause more when main-hard-limit is 0.

    Solved Prefix. :)
     
    WinterBuild7074 likes this.
  10. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    That means I only need to set that to "yes"? Then it will automatically restart?
     
  11. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Yes, whenever it crashes, or when you do /stop
     
  12. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    OK, I will add the [Solved] tag when I noticed that my server is not anymore crashing.
     
  13. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    I would personally never do this. If something on your server is leaking memory, this is the stupidest thing you can do, because it gives whatever is leaking free rein to consume all the available memory in the machine and cause the entire machine to crash.
     
  14. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    My server didn't crash at all. It helped!
    @dktapps But, what shall I do then? I don't want it to crash in the middle of the night. Is there another way to fix this? The best way?
     
  15. Kabluinc

    Kabluinc Baby Zombie

    Messages:
    129
    Try running your server without this plugin: 'SkyWarsDoDo 1.0.0 Reloaded_ENGLISH by KaitoDoDo'

    Iv personally had very bad experiences with that plugin (causes huge memory leak). Server used to use up 1GB RAM within a few hours even with no players on.

    If that does solve it, I would suggest using this plugin for SkyWars instead: https://github.com/svilex/SkyWars-PocketMine
     
  16. 0x15f

    0x15f Baby Zombie

    Messages:
    145
    GitHub:
    0x15f
    Not only is that plugin a ram eater but it's also stolen.
     
  17. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    You could enable loop in your start.sh (or .bat) to automatically let it restart when it crashes
     
    WinterBuild7074 likes this.
  18. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    A piece of the start.sh:
    Code:
    #!/bin/bash
    DIR="$(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
    cd "$DIR"
    
    DO_LOOP="no"
    
    while getopts "p:f:l" OPTION 2> /dev/null; do
    That means set DO_LOOP to "yes"? OK, I'll try that.
     
  19. Intyre

    Intyre Administrator Staff Member PMMP Team

    Messages:
    81
    GitHub:
    Intyre
    And why did you ignore this piece of start.sh?
    Code:
    while getopts "p:f:l" OPTION 2> /dev/null; do
       case ${OPTION} in
            p)
                PHP_BINARY="$OPTARG"
                ;;
            f)
                POCKETMINE_FILE="$OPTARG"
                ;;
            l)
                DO_LOOP="yes"
                ;;
            \?)
                break
                ;;
        esac
    done
    
    What is getopts? http://wiki.bash-hackers.org/howto/getopts_tutorial
     
    0x15f likes this.
  20. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    I didn't really ignore that. I only showed that piece that people will know what part of the code the DO_LOOP is in.
     
  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.