From ae8000249d9d39daf14b8c28e548672d2bce217a Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 25 Jun 2024 21:01:02 +0200 Subject: [PATCH] chore: Increase timeout for process termination ### Motivation Current Java Edition Minecraft servers, especially those that are forks of the vanilla Minecraft server software, take some time to properly stop and save all resources, i.e. worlds, inventories and other state to disk. Prematurely terminating those processes leads to worlds not being saved at all, world corruption due to the interrupted save process and unloadable worlds. In addition this leads to lock files being left that don't belong to any process anymore. ### Modification Increase the timeout to 60 seconds. This gives servers more time to properly store all files and shutdown whilst still cleaning up servers that may have become stuck whilst shutting down. ### Result Server processes are now given more time to properly shutdown. --- .../java/eu/cloudnetservice/node/config/JsonConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/src/main/java/eu/cloudnetservice/node/config/JsonConfiguration.java b/node/src/main/java/eu/cloudnetservice/node/config/JsonConfiguration.java index 509ead697b..ef33b109d0 100644 --- a/node/src/main/java/eu/cloudnetservice/node/config/JsonConfiguration.java +++ b/node/src/main/java/eu/cloudnetservice/node/config/JsonConfiguration.java @@ -212,7 +212,7 @@ public boolean fileExists() { if (this.processTerminationTimeoutSeconds <= 0) { this.processTerminationTimeoutSeconds = ConfigurationUtil.get( "cloudnet.config.processTerminationTimeoutSeconds", - 5, + 60, Integer::parseInt); }