From 00703ee238729a8d5b3d17edf8dc16d6c6c6b601 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 26 Oct 2019 19:47:48 +0200 Subject: Core/Misc: Enable MaxCoreStuckTime setting by default Enable MaxCoreStuckTime setting by default to force worldserver to exit in case of infinite loops. Note that this will not affect existing setups with the setting MaxCoreStuckTime set to 0 in the local worldserver.conf . --- src/server/worldserver/Main.cpp | 2 +- src/server/worldserver/worldserver.conf.dist | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 2accd7297c2..996699e7d82 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -318,7 +318,7 @@ extern int main(int argc, char** argv) // Start the freeze check callback cycle in 5 seconds (cycle itself is 1 sec) std::shared_ptr freezeDetector; - if (int coreStuckTime = sConfigMgr->GetIntDefault("MaxCoreStuckTime", 0)) + if (int coreStuckTime = sConfigMgr->GetIntDefault("MaxCoreStuckTime", 60)) { freezeDetector = std::make_shared(*ioContext, coreStuckTime * 1000); FreezeDetector::Start(freezeDetector); diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 58694ade631..185ed1e1055 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -448,10 +448,10 @@ LogDB.Opt.ClearTime = 1209600 # # MaxCoreStuckTime # Description: Time (in seconds) before the server is forced to crash if it is frozen. -# Default: 0 - (Disabled) -# 10+ - (Enabled, Recommended 10+) +# Default: 60 - (Enabled, Recommended 10+) +# 0 - (Disabled) -MaxCoreStuckTime = 0 +MaxCoreStuckTime = 60 # # AddonChannel -- cgit v1.2.3