{"id":2361,"date":"2022-08-30T15:24:13","date_gmt":"2022-08-30T15:24:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/05\/is-it-a-best-industry-practice-to-restart-web-servers-periodically-closed-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:24:13","modified_gmt":"2022-08-30T15:24:13","slug":"is-it-a-best-industry-practice-to-restart-web-servers-periodically-closed-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/is-it-a-best-industry-practice-to-restart-web-servers-periodically-closed-collection-of-common-programming-errors\/","title":{"rendered":"Is it a Best Industry practice to restart web servers periodically? [closed]-Collection of common programming errors"},"content":{"rendered":"<p>There&#8217;s a difference between &#8220;Best Practice&#8221;, things that many people do for good reasons, and &#8220;Common Practice&#8221;, things that many people do because they&#8217;re lazy and\/or ignorant.<\/p>\n<p>Applications and (worse) servers that need to be routinely restarted or rebooted to keep running well <em>are<\/em> fairly common. But it&#8217;s also a clear indication that you have a critical bug.<\/p>\n<p>By making it SOP to restart an application on a regular basis, your company is hiding a serious bug under the carpet. This is inexcusable, the bug needs to be faced down and squashed, or it will come back to bite you later.<\/p>\n<p>Ideally, your company should find a better developer. Unfortunately, this may lead to rather a lot of work to rewrite large tracts of your code. The fact that the developer either thinks that poorly written code is acceptable, or doesn&#8217;t know enough to recognize the symptoms of buggy code, suggests the quality of the code is low. A good developer will be constitutionally incapable of leaving it in that state.<\/p>\n<p>Given that you may not be in a position to replace the developer, a few suggestions:<\/p>\n<ul>\n<li>See if you can have a better developer review the code and report their assessment to someone who can do something about it,<\/li>\n<li>Have a look into profiling tools. If you&#8217;ve got the skills and\/or inclination, try profiling the code yourself to find the leak and report it.<\/li>\n<\/ul>\n<p>Even without getting into developer-oriented profiling tools, there are plenty of sysadmin-oriented tools for profiling and monitoring memory usage on Java applications. You should really set up monitoring of memory (particularly heap) on your production servers in any case. I&#8217;d recommend this even if you were running quality code. It may give you advance warning when your buggy apps are about to topple over.<\/p>\n<p>But better yet, these should help you to gather proof that there is a leak, and may even indicate where the issue is in the application. This will give you better ammunition to lobby for it to be fixed.<\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-05 22:29:09. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>There&#8217;s a difference between &#8220;Best Practice&#8221;, things that many people do for good reasons, and &#8220;Common Practice&#8221;, things that many people do because they&#8217;re lazy and\/or ignorant. Applications and (worse) servers that need to be routinely restarted or rebooted to keep running well are fairly common. But it&#8217;s also a clear indication that you have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2361","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2361"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2361\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}