Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Derleth

Graceful shutdown of server

Recommended Posts

Quote

Taskkill

If you don't want to use messages.xml for the automatic server termination, you can go with taskkill instead (link to Microsoft documentation).

All you need to do is use Windows Scheduler, FireDaemon or similar application to send the taskkill command without /f parameter and you will invoke graceful shutdown of DayZ server application ("--- Termination successfully completed ---" line will be written to the .rpt file when the termination is finished).

taskkill /im DayZServer_x64.exe

To setup an automatic restart you will need some other application that will automatically start the terminated server as Windows Scheduler, FireDaemon or a similar application.

Hello @ImpulZ, since I want my server to always restart at the same time, I have chosen not to use the messages countdown but the Taskkill command as detailed above. However, it seems to me that the termination of the server is not done "gracefully" as described, it shuts down instantly making the restart go through the process of restoring corrupted persistence from the backup. Usually without problems but now that the server is getting a few more regular players we've had one or two examples of parts of bases, tents or cars disappearing after a restart.

Have I set it up erroneously or does it simply no longer work to terminate the server safely this way?

If using messages countdown is now the only way to shutdown a server safely, is there any way to make the shutdown/restart by messages happen at the same time regardless of unscheduled restarts (i.e. after crashes)?

Also, if Taskkill is not safe and I want to make an unscheduled restart, how do I manually shut down the server safely? Usually nothing bad happens when simply killing the process, but not getting the "termination successfully completed" line makes me very nervous every time..

Share this post


Link to post
Share on other sites

The steps described above should still work, both the taskkill without /f and the manual shutdown by just closing the server process with X.

  • Thanks 1

Share this post


Link to post
Share on other sites
39 minutes ago, ImpulZ said:

The steps described above should still work, both the taskkill without /f and the manual shutdown by just closing the server process with X.

Ok, thanks for the answer. Maybe just my paranoia then...

Share this post


Link to post
Share on other sites
11 hours ago, Derleth said:

Ok, thanks for the answer. Maybe just my paranoia then...

Try it using a batch file with Admin privileges.  I had a community server going last year and doing it that way, it terminated gracefully always.

  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, Derleth said:

Hello @ImpulZ, since I want my server to always restart at the same time, I have chosen not to use the messages countdown but the Taskkill command as detailed above. However, it seems to me that the termination of the server is not done "gracefully" as described, it shuts down instantly making the restart go through the process of restoring corrupted persistence from the backup. Usually without problems but now that the server is getting a few more regular players we've had one or two examples of parts of bases, tents or cars disappearing after a restart.

Have I set it up erroneously or does it simply no longer work to terminate the server safely this way?

If using messages countdown is now the only way to shutdown a server safely, is there any way to make the shutdown/restart by messages happen at the same time regardless of unscheduled restarts (i.e. after crashes)?

Also, if Taskkill is not safe and I want to make an unscheduled restart, how do I manually shut down the server safely? Usually nothing bad happens when simply killing the process, but not getting the "termination successfully completed" line makes me very nervous every time..

You can also use a tool that understands RCON and issue a shutdown command. BEC used to be good for that. Battlemetrics. CF/Omega(forget the name). I'm sure there are others.

  • Like 1

Share this post


Link to post
Share on other sites

In my opinion, the steps which you described above should still work. The servers are restarted and are generally available again within 15 minutes. If you don't want your server shutdown to be frequently, I advise you to buy a virtual server that can solve many of your problems. I have one from https://intergrid.com.au/virtual.php because they have the cheapest prices on the market and you can choose what package you want or create a new one.

Edited by ArnoldWilder

Share this post


Link to post
Share on other sites
18 hours ago, ArnoldWilder said:

Graceful shutdown and hard shutdown are two opposing methods of turning off a computer. A graceful shutdown is when a computer is turned off by software function and the operating system (OS) is allowed to perform its tasks of safely shutting down processes and closing connections. The servers are restarted and are generally available again within 15 minutes. This typically occurs at 5am Pacific Time for US servers, and 2pm Pacific time for Oceanic. Realm Maintenance. The realms are brought down for up to 6 hours, usually commencing at 5am Pacific Time for US and Oceanic realms.

Thank you, but this topic was about my private server and graceful shutdown of the DayZ server application process, not the computer itself. Anyway the taskkill command does seem to work correctly, I have not had the problem in a long time. The only times there are bad shutdowns are when the server machine has a hard shutdown as you say, and this is not something that normally happens, basically only when a storm knocks out the power grid...

Edited by Derleth

Share this post


Link to post
Share on other sites

×