GameServerManagers / LinuxGSM

The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
https://linuxgsm.com
MIT License
4.3k stars 820 forks source link

Improving concurrent commands with lockfiles #1886

Open UltimateByte opened 6 years ago

UltimateByte commented 6 years ago

We could use more lockfiles, and these lockfiles could use timings to prevent stuff from happening too soon or at the same time (say with bad crons, or when you run a crons + the same function at the same time).

1) Consider the server start delay

A server that was just started will not answer to queries, sometimes for a while (Rust takes ages to start, the game could be downloading workshop content, etc.). If the server is not responding for some valid reason, you do not want it to bootloop.

Regarding this:

2) You don't want to run two monitor at the same time, and you'd love to restart the server as fast as possible if it does not answer to queries. After the first fix has been implemented, we can now add multiple improvements.

With this in place, users could run the monitor cronjob every minute without any issues.

3) You don't want multiple updates to run at the same time

4) Move lockfiles checks to its own function

That's all I can think about for now. If you have more ideas for lockfiles, please share.

dgibbs64 commented 6 years ago

Happy with this suggestion and recommend it is implemented

dgibbs64 commented 4 years ago

number 1 has been implemented. A monitor delay now exists for all servers to prevent accidental reboot with monitor.