{"id":12829,"date":"2023-01-08T22:37:52","date_gmt":"2023-01-08T22:37:52","guid":{"rendered":"https:\/\/test2.gginternal.net\/knowledgebase\/article\/what-is-watchdog-and-why-does-it-crash-my-server\/"},"modified":"2023-01-08T22:37:52","modified_gmt":"2023-01-08T22:37:52","slug":"what-is-watchdog-and-why-does-it-crash-my-server","status":"publish","type":"ht_kb","link":"https:\/\/ggservers.com\/knowledgebase\/article\/what-is-watchdog-and-why-does-it-crash-my-server\/","title":{"rendered":"What is Watchdog and why does it crash my server?"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/ggservers.com\/knowledgebase\/wp-content\/uploads\/2024\/03\/banner10_1mgbruh.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>This guide will explain the watchdog component of your server and how to take proper action in case it crashes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\u2753 What is Watchdog \u2753<\/h1>\n\n\n\n<p>The watchdog is a component of the server that checks how much time a single <code>tick<\/code> takes. If the tick takes longer than it should, the watchdog will crash the server on purpose to avoid <strong>world corruption<\/strong>.&nbsp;<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">What is a <code>tick<\/code> ?<\/h6>\n\n\n\n<p>Like in every game, for something to happen inside it, some code has to run. This code loops over and over to spawn mobs, calculate the result of damage, grow crops, change blocks with WorldEdit, and so on.<\/p>\n\n\n\n<p>When that game loop happens (updates), we call that a <code>tick<\/code>.<\/p>\n\n\n\n<p>The game normally runs at a fixed rate of 20 ticks per second, so one tick happens every 0.05 seconds (50 milliseconds, or five-hundredths of a second, or one twentieth of a second), making an in-game day last exactly 24000 ticks, or 20 minutes.<br>\n<em>Source: <a href=\"https:\/\/minecraft.fandom.com\/wiki\/Tick\">Minecraft Wiki<\/a><\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Within a second, there are 20 ticks, meaning the game loop happens <code>20<\/code> times per second. So every tick takes at most <code>50<\/code> milliseconds.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>20<\/code> is known as <code>TPS<\/code> (ticks per second)<\/li>\n\n\n\n<li><code>50<\/code> is known as <code>MSPT<\/code> (milliseconds per tick)<\/li>\n<\/ul>\n\n\n\n<p>So by default, the watchdog crashes your server if a tick takes more than <code>60<\/code> milliseconds when it should normally take only <code>50<\/code> milliseconds.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">  How to Identify a Watchdog Error  <\/h3>\n\n\n\n<p>Usually, if your server is crashed by the watchdog, you will see the following error in your console:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;FATAL]: A single server tick took 60.00 seconds (should be max 0.05)\n&#91;FATAL]: Considering it to be crashed, server will forcibly shutdown.\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Also, a crash report should be generated, and it should start like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\nTime:\nDescription: Watching Server\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f How to Solve a Watchdog Error \u2699\ufe0f<\/h3>\n\n\n\n<p>To solve the watchdog error, we suggest you try identifying the source of your lag that makes the server ticks take longer than they should. If you are on our Premium plans, or have the <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/premium-support-addon\/\">Premium Support Addon<\/a>, our support can help you identify the cause and get it fixed, just open a <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-open-a-support-ticket\/\">support ticket<\/a>!<\/p>\n\n\n\n<p>After identifying the cause, you will be able to take action, depending on the case.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A possible cause of the situation may be a ticking entity or block on your server, or even a ticking world, as they can create huge amounts of lag and even crash the server.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Our guide explaining ticking entity errors and how to solve them can be found <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-fix-a-ticking-entity-error\/\">here<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>World or chunk corruption can also be the source of the issue, causing significant lag and even crashing the server.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Our guide explaining how to remove specific chunks from your world using MCASelector is available <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-remove-unwanted-chunks-using-mcaselector\/\">here<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Improving server performance should help at any time.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">We have guides for improving your Minecraft server performance <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/improve-your-server-performance\/\">here<\/a>, Forge modded server performance <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/improve-your-forge-modded-server-performance\/\/\">here<\/a>, and Fabric modded server performance <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-improve-performance-on-your-fabric-modded-server\/\">here<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disabling the watchdog by setting the <code>max-tick-time<\/code> value in the <code>server.properties<\/code> file to <code>-1<\/code> is a last resort, but we <strong>do not recommend<\/strong> it because the watchdog crashes the server when it detects that a tick took longer than expected, which usually means your server is already crashed or unplayable.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Our guide explaining how to edit your server configuration files, including the server.properties file, is available <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-properly-edit-a-server-config-file-depending-on-its-type\/\">here<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">  How to change the time a tick can take before crashing the server  <\/h3>\n\n\n\n<p>This is changed from the <code>max-tick-time<\/code> option found in <code>server.properties<\/code>. <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-properly-edit-a-server-config-file-depending-on-its-type\/\">Here<\/a> is our guide explaining how to edit your server configuration files, including <code>server.properties<\/code>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The maximum number of milliseconds a single tick may take before the server watchdog stops the server with the message <code>A single server tick took 60.00 seconds (should be max 0.05)<\/code>. Considering it crashed, the server will be forcibly shutdown.<br>\n<em>Source: <a href=\"https:\/\/minecraft.fandom.com\/wiki\/Server.properties\">Minecraft Wiki<\/a><\/em><\/p>\n<\/blockquote>\n\n\n\n<p>This option is set by default to <code>60000<\/code> and <strong>we suggest you leave it like this.<\/strong><br>\nSetting this option to <code>-1<\/code> will disable the watchdog component permanently, <strong>but we do not recommend doing so.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-success\">If you have any issues regarding a watchdog error on your server, please contact us on live chat or via the <a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-open-a-support-ticket\/\">ticket system<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2755Useful Links\u2755<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-downgrade-your-world-to-an-older-version\/\">How to Downgrade Your World to an Older Version<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/corrupted-world-error-type\/\">Corrupted World Error Type<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/ggservers.com\/knowledgebase\/article\/how-to-properly-edit-a-server-config-file-depending-on-its-type\/\">How to Edit Your Server Configuration Files<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This guide will explain the watchdog component of your server and how to take proper action in case it crashes.<\/p>\n","protected":false},"author":3,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"_acf_changed":false,"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"ht-kb-category":[27],"ht-kb-tag":[],"class_list":["post-12829","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-minecraft"],"acf":[],"_links":{"self":[{"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb\/12829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=12829"}],"version-history":[{"count":0,"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb\/12829\/revisions"}],"wp:attachment":[{"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=12829"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb-category?post=12829"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/ggservers.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb-tag?post=12829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}