Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Problems with two servers in one Linux instance

  1. #1

    Exclamation Problems with two servers in one Linux instance

    I have a Linux VPS instance with the following features
    OS: Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-162-generic x86_64)
    vCPU*: 2
    Mem (GiB): 0.5
    Storage Network Performance (Gbps): Up to 5
    The servers are executed in the following way:

    Code:
    ./mohaa_lnxded +set dedicated 1 +set fs_outputpath "/home/ubuntu/svalog" +set logfilename "qcona.log" +set net_port 12203 +set sv_maxclients 64 +exec serverA.cfg
    ./mohaa_lnxded +set dedicated 1 +set fs_outputpath "/home/ubuntu/svblog" +set logfilename "qconb.log" +set net_port 12204 +set sv_maxclients 32 +exec serverB.cfg
    For three or four hours both servers are online, then the server with port 12203 goes off with one message at the end "killed" and another server stays online.
    Both servers are executed with the same files.

    this is the log file
    logfile.txt
    Last edited by feralv; February 19th, 2019 at 11:34 PM.

  2. #2

    Default

    so, are you running the exact same mohaa_lnxded two times? or are they in different folders?

  3. #3
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    500MB of RAM is very low for 2 instances.. Remember that OS itself takes some, and one MoHAA server - I guessaround 150 - 250MB. Probably OS kills one process when there is not enough memory.

  4. #4
    Client Beta Testers Appelpitje's Avatar
    Join Date
    Jan 2012
    Location
    Belgium
    Posts
    571

    Default

    You can check if it got killed by the OS by running the command: dmesg -T
    and look for OOMKiller (Out of memory killer)
    Last edited by Appelpitje; February 18th, 2019 at 01:24 AM.

  5. #5
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    64 client slots takes a bit more memory than one would think, especially when people start actively playing. I suggest that your first step be to reduce each instance to around 10 slots, run for a day, and see if the problem goes away. That will tell you if memory is the issue. At first blush glance, I'd suspect too little memory.

    Second, I am not sure how mohaa/reborn deals with file locks and contention for handles - I would try having separate asset folders (not just separate 'main', but separate 'mohaa'). Try starting each server from it's separate mohaa directory instead of starting the same copy from the same spot twice. As best as I can recall, nothing really special is needed to run two servers on one machine other than separate ports and resources.

    tail /var/log/messages is your friend. Also take a look at the resident set and virtual size for the two processes via top. My primary platform is *nix, so let me know if you have additional trouble or get stuck.

    Todesengel

  6. #6

    Default

    Quote Originally Posted by Zappa View Post
    so, are you running the exact same mohaa_lnxded two times? or are they in different folders?
    I'm running the same files, I thought the problem was that.
    I tried other server files, but still the same problem

  7. #7

    Default

    I'm going to do the Todesengel test

    I did the test with other server files, I also tried with the original files (without mods)
    Before I could run 2 servers in Windows of 512 of RAM without problems, but Linux is a different OS can be killing the process due to lack of RAM.

  8. #8
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    Generally speaking, windows is going to take far more resources and memory than a marginally tuned unix machine. I haven't done it, but I am dubious that a windows machine with 512mb ram can run a 32 slot instance and a 64 slot instance without a problem. Just running the OS with 512mb ram is going to be tough.

    What all services and processes do you have enabled on the unix machine? Webserver? Chat Server? SQL?

    I haven't done any detailed poking at the memory footprint of lnxded. I can tell you that on a centos box with 4g I could run a 32 slot instance no problem. A 64 slot instance (instead) would come up and players could join, but after a handful (maybe around 15 or 20) players it would crash. I clicked the 'add vm memory' button and took it to 8gb and 64 users ran perfectly even with a lot of users. However... there was also a lot of other things running on the box (webserver, phpbb, teamspeak, etc). YMMV.

    Tode

  9. #9
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    It can also depend on swap. Maybe you had swap configured on your windows machine, and none on your linux box, so kernel can't use swap if there's not enough memory so it has to kill processes.

  10. #10
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    Yeah, Razor is spot-on, I should have mentioned swap too. But that is just another face of a memory problem (or vice versa! lol)

    Feralv - did setting both instances to 10 allow them to run stable? I'm curious.....

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •