The International Simutrans Forum

Community => Game Servers => Topic started by: jamespetts on December 05, 2017, 10:59:54 PM

Title: Running two games on the same server
Post by: jamespetts 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 (https://github.com/jamespetts/simutrans-extended/blob/master/simctrl-simple.txt)), 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.
Title: Re: Running two games on the same server
Post by: prissi 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.
Title: Re: Running two games on the same server
Post by: Vladki 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