The International Simutrans Forum


Author Topic: Running two games on the same server  (Read 3386 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20950
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Running two games on the same server
« on: December 05, 2017, 10:59:54 PM »
Does anyone know what steps are necessary in order to run two games on the same server? I have been trying to do so with Timothy's old script (here), but I find that, whenever I start one instance, the other instance receives the kill signal from somewhere (I have not been able to identify from where). I should note that the script is set to run with the "restart" command at 2 minute intervals using cron in respect of the main instance only.

I should be grateful if anyone who has had success in making this work could let me know what configuration has been used. Thank you in advance.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Running two games on the same server
« Reply #1 on: December 06, 2017, 04:57:44 AM »
You can do this manually. Just specify two different ports. (And better also specify different names on the commandline too.)

So for instance you write
simutrans -server13353 -server_name=Exp1 -load game1.sve&
simutrans -server13354 -server_name=Exp2 -load game2.sve&

That does not need any script. And Timothy's script can only handle a single server, since it only stores exactly one pid. You could run it from two different locations, but I would not use the script then. it should not kill simutrans randomly.

If you server is a virtual server, it may run in main memory limitations. The supervisor software will then kill one processs after a short grace period. Use "top" or "htop" command or something like that to check the memory consumption.

Offline Vladki

  • Devotee
  • *
  • Posts: 3735
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Running two games on the same server
« Reply #2 on: December 06, 2017, 07:55:08 AM »
I was running 3 servers at the same time. I'll send you the modified script for automatic updates and restarts (linux) in the evening.

Sent from my ONEPLUS A3003 using Tapatalk