patrix87 / PowerShellGSM

A Comprehensive PowerShell Tool for Simple Automated Game Server Management.
https://github.com/patrix87/PowerShellGSM/
MIT License
109 stars 19 forks source link

Ark survival ascended server: Problem with running the server twice. #35

Closed TOXid closed 8 months ago

TOXid commented 9 months ago

Tell me how to check the stability of the server? I encountered a problem that after restarting for the update, two copies of the server started up with an interval of 20 minutes.

TOXid commented 9 months ago

The double start problem appeared several times. After a reboot, the script considers the server dead and starts a new copy. How will the server be checked at startup? Could the problem be due to the fact that Rcon is using another service at this moment?

simonghpub commented 9 months ago

When the script attempts to start the server it creates a .lock file in the servers folder, the lock file gets removed when it has determined that the server is in fact running. If the lock file doesn't get removed for some reason it will automatically be removed after 30 minutes (line 48 in global.psm). The presence of the .lock file prevents the script from starting any further processes.

After the reboot you mentioned, did you by any chance start the server yourself before the job in the task scheduler kicks in?

TOXid commented 8 months ago

When the script attempts to start the server it creates a .lock file in the servers folder, the lock file gets removed when it has determined that the server is in fact running. If the lock file doesn't get removed for some reason it will automatically be removed after 30 minutes (line 48 in global.psm). The presence of the .lock file prevents the script from starting any further processes.

After the reboot you mentioned, did you by any chance start the server yourself before the job in the task scheduler kicks in?

No, it was an automatic server restart during the update. I noticed that neither affinity nor priority was applied on the first copy.