News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Running two games on the same server

Started by jamespetts, December 05, 2017, 10:59:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

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.

Vladki

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