1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Help Server Memory Leak in 1.0?

Discussion in 'Multiplayer' started by x64BiTPiXeL, Jul 23, 2016.

  1. x64BiTPiXeL

    x64BiTPiXeL Space Spelunker

    Hey guys, just found 1.0 is out, yay!!

    Previously when running a server I found memory leak issues eating up the poor VPS. I created a scheduled task to restart the server daily, and that mostly quelled the issue. The server was allowed to use up to 8gb, and with 2-3 playing it never quite got that far until about 15 hours along (even if we weren't playing).

    Has the memory issue now been fixed? I want to go and update my various installations, just would like to know if this problem will persist and I need to schedule again or I can run it happily completely native?

    Thanks!!
     
  2. djriful

    djriful Scruffy Nerf-Herder

    Pretty nuts on memory usage :c

    This is running on my Surface Pro 2 (24/7 server Plex + Starbound) with 2-3 streaming and 2 players on Starbound.

    Yes, sound insane, this is a proper server setup I have.

    Intel Core i5-4300U
    Cores: 2 / 4 Threads
    Frequency: 1.9 / 2.9 Ghz
    RAM: 4 GB
    Storage: 128GB SSD + 5.5TB Data Drives
    Network: 1Gbps Backbone / 100 Mbps Down / 10Mbps Up


    How did I do it... :p Heavy optimization.

    [​IMG]
     
    Last edited: Jul 24, 2016
  3. x64BiTPiXeL

    x64BiTPiXeL Space Spelunker

    That looks very heavily managed!!!!!!!

    I might try hosting on a different server. How is it that you can optimise it in such a way as to keep it's memory usage so low?
     
  4. revol

    revol Scruffy Nerf-Herder

  5. djriful

    djriful Scruffy Nerf-Herder

    As admin in game try /serverreload
     
  6. LordBob5

    LordBob5 Master Chief

    How is that beneficial to stopping servers restarting whenever they feel like it due to memory leaks?
    --- Post updated ---
    How is that beneficial to stopping servers restarting whenever they feel like it due to memory leaks?
     
  7. djriful

    djriful Scruffy Nerf-Herder

    /serverreload doesn't interrupt, it might have a small pause for couple of seconds. Usually help garbagecollect in some way. It is just a workaround.
     
  8. revol

    revol Scruffy Nerf-Herder

    /serverreload doesn't appear to have helped. My memory usage did not reset.
     
  9. LordBob5

    LordBob5 Master Chief

    Likewise. didn't notice a drop in anything.
     
  10. Hammster1911

    Hammster1911 Void-Bound Voyager

    My dedicated peaks up to 16GB ram usage after a day. We usually have about 10 ppl playing over the day. After the starbound server restart its back to 300mb ram usage. Gotta love C++ garbage collection ...

    Edit: I am logging my mem usage over the next day using the following script.


    Code:
    #!/bin/bash -e
    
    echo "      date     time $(free -m | grep total | sed -E 's/^    (.*)/\1/g')"
    while true; do
        echo "$(date '+%Y-%m-%d %H:%M:%S') $(free -m | grep Mem: | sed 's/Mem://g')"
        sleep 1
    done
    --- Post updated ---
    Okay the leak only appears if we have user activity (entering new worlds etc.). we even added 2 additional servers for testing, one was ideling and on the other one i was playing alone.

    i will provide the log later this day (currently at work)
     
    Last edited: Jul 25, 2016
    LordBob5 likes this.
  11. LordBob5

    LordBob5 Master Chief

    Thanks for the update. Let me know how you get on with the testing.

    Sent from my SM-G900F using Tapatalk
     
  12. I run it on a dedicated 32 gb server, with a 32 core xeon, I don't see any memory leaks?
    Okay the leak only appears if we have user activity (entering new worlds etc.). we even added 2 additional servers for testing, one was ideling and on the other one i was playing alone.

    That is not a memory leak. It requires a lot of memory to run this game, and to load up the assets required. My server has been up for 2 hours, and it is 755.7 not going up, because no one is doing anything, a memory leak, is it just continues to go up and up and up and never stops. My server also has like 15 mods. I just joined it, it went up to 800, then i left and it went back down. I think your underestimating how much ram this game uses, esp a server with a lot of people.

    A virtual server, with a top end xeon, which gave u a dedicated hyper threaded , 4 cores, and 4 gbs of ram is capable of hosting with out lagging like 3 or 4 people.
     
    Last edited by a moderator: Jul 27, 2016
    LordBob5 likes this.
  13. Red Oni

    Red Oni Tentacle Wrangler

    Tad bit late there, memory leaks were patched (seemingly) on the 1.0.2 update, alongside with the issue of players not being unloaded and idle worlds not being unloaded as well.
     
    Dunto and mollygos like this.
  14. Interesting never even noticed it.
     
  15. LordBob5

    LordBob5 Master Chief

    Yet as soon as my server starts reaching 6.5GB+ in RAM, it auto restarts still. This patch hasn't really fixed anything. Maybe its just client side fixing?
     
  16. Red Oni

    Red Oni Tentacle Wrangler

    I'm certain the fix is only for certain setups, as some people seem to have gotten it fixed due to this patch and some people seem to be still standing in the mud.

    And I assume this has something to do more with client sided updates rather than the server, as the memory usage from the last patch on client seems to have nearly doubled.
    On a side-note, the fix also seems to have made the server more hungry for processing power on my side.
     
    LordBob5 likes this.
  17. LordBob5

    LordBob5 Master Chief

    [​IMG]
    No steady decline in memory. Once its up, its up. (normally!)
    As soon as it reaches 6GB(600), it auto restarts, hence the crash.
     
  18. LowLatencyServers

    LowLatencyServers Void-Bound Voyager

    Just wanted to add to this, even 32GB of ECC enabled RAM(We don't limit RAM), the memory usage keeps increasing with the most recent update, until eventually the server stops responding to queries, join requests, and kicks all players off. The process keeps running and using more memory, but can not be used in any method. This is usually around the 5-7GB mark.
     
    LordBob5 likes this.
  19. LordBob5

    LordBob5 Master Chief

    Incredible. Lol. Thanks for posting this. 1.03 still doesn't really address server memory leaks.

    Sent from my SM-G900F using Tapatalk
     

Share This Page