quarantin / pz-server-tools

A set of tools to help you with running a Project Zomboid game server (Linux only)
GNU Affero General Public License v3.0
63 stars 13 forks source link

restart_delay always zero is causing restarts to take a bit too long #10

Closed johnstsimoes closed 2 years ago

johnstsimoes commented 2 years ago

I'm not sure if this is an issue or just a question, but when a mod change is detected and server stops (after the normal countdown) it's taking way longer (maybe close to 10 minutes) than usual for the server to start again. What is the best way to configure restart_delay to, let's say, 1 minute? Thanks!

quarantin commented 2 years ago

As far as I remember you can only change it when performing a manual restart, like this: pzrestart --now

But if you don't want to wait for the restart sequence you can try to remove values from the restart-sequence list in /etc/pzst/config.json, but I'm not sure it would be working, haven't tested it myself. Worst case you could just set the restart sequence to one minute or so.

johnstsimoes commented 2 years ago

Thanks! We are happy with the restart sequence and it's working perfectly, sorry if I didn't explain the problem properly.

The real problem is once the countdown goes to zero, the server shuts down and sits idle for about 5 minutes before it starts again.

quarantin commented 2 years ago

Every time pzserver restarts, pzst will perform a backup of your Zomboid/Saves folder. In case the save is big and you have a slow hard disk I guess it could take some time for the process to finish. You could try to disable the backup temporarily to validate this assumption. As pzstadmin user, run the following command: sudo nano /usr/local/bin/pzstartloop

and then comment out the following line: UNSAFEBACKUP=${UNSAFEBACKUP} pzbackupsave

Like this (just add a # character at the beginning of the line): #UNSAFEBACKUP=${UNSAFEBACKUP} pzbackupsave

For the change to take effect you have to stop the pzserver: pzquit

Then start the pzserver the usual way: pzstart

On next restart the backup should not occur.

johnstsimoes commented 2 years ago

Many thanks - that's what I was looking for!