{"id":2076,"date":"2017-08-02T12:41:36","date_gmt":"2017-08-02T16:41:36","guid":{"rendered":"https:\/\/www.pair.com\/support\/kb\/?p=2076"},"modified":"2020-02-26T12:36:03","modified_gmt":"2020-02-26T17:36:03","slug":"what-is-a-503-error","status":"publish","type":"ht_kb","link":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/","title":{"rendered":"What is a 503 Error?"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">A 503 error message is generated on the server side to tell the user that the service is unavailable. <\/span><\/p>\n<p><a name=\"&quot;1\"><\/a><\/p>\n<h3>Common Error Messages<\/h3>\n<pre><span style=\"font-weight: 400;\">HTTP Server Error 503<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">503 Error<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">HTTP 503<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">Http\/1.1 Service Unavailable<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">503 Service Unavailable<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">Service is unavailable<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">Service Unavailable - DNS Failure<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">503 errors can occur if a site is taken down for maintenance or if there is a server-side problem. A server-side problem doesn\u2019t necessarily mean your server itself. It could be that the server has too many processes running or it\u2019s trying to run inefficient programming.<\/span><\/p>\n<p><a name=\"2\"><\/a><\/p>\n<h3>Here are some common causes:<\/h3>\n<p><a name=\"2.1\"><\/a><\/p>\n<h4>Inefficient Programming<\/h4>\n<p><span style=\"font-weight: 400;\">A 503 is often due to inefficient programming. Inefficient code can slow down your server and eventually cause 503 error. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">To fix the immediate problem, begin turning programs on your server off and on, one by one. If you are on a Dedicated or VPS server, you may also be able to restart Apache. See our\u00a0<\/span><a href=\"https:\/\/www.pair.com\/support\/kb\/how-to-restart-apache\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">How to Restart Apache<\/span><\/a><span style=\"font-weight: 400;\"> article for more information. <\/span><\/p>\n    \t\t<div class=\"hts-messages hts-messages--danger   hts-messages--withicon \"   >\r\n    \t\t\t    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tKeep in mind that any websites or services on your server will be unavailable while you are doing this.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<p><span style=\"font-weight: 400;\">To fix the overall problem, you must go through your code and look for ways to make it more efficient.<\/span><\/p>\n<p><a name=\"2.2\"><\/a><\/p>\n<h4>Zombie Processes<\/h4>\n<p><span style=\"font-weight: 400;\">Sometimes processes aren\u2019t properly deleted after they finish running. These processes are known as \u201czombie\u201d processes. They slow down your website simply by existing. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">The reason why requires some understanding of what zombie processes actually are. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">When a process is done running, it leaves its process descriptor in the memory. This process descriptor signals to the process\u2019 parent that the child process has ceased to run. If all goes correctly, the parent process will gather the child\u2019s information and then completely remove it from memory. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sometimes, though, the parent program isn\u2019t programmed correctly and never gathers the child process\u2019\u00a0information. Without the child\u2019s information, the child will not be completely removed. This is how a zombie process is made. One or two zombie processes are fine, but the problems usually start when they begin to pile up.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">While zombie processes don\u2019t use up any system resource, they do keep their process ID (PID). On Linux servers, there is a limited number of PIDs. Usually, when a process is completely removed, its PID becomes available for a new process to use. \u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The more zombie processes a server has, the fewer PIDs there are for legitimate processes. If a server runs out of PIDs due to an overabundance of zombie processes, it may generate a 503 error. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Check out <\/span><a href=\"https:\/\/www.howtogeek.com\/119815\/htg-explains-what-is-a-zombie-process-on-linux\/\"><span style=\"font-weight: 400;\">HowToGeek\u2019s explanation<\/span><\/a><span style=\"font-weight: 400;\"> for more details about zombie processes on a Linux machine. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">To see if you have zombie processes bogging down your server, complete the following steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Open a terminal (Mac) or command prompt (Windows) window<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Type: <\/span><span style=\"font-weight: 400; font-family: monospace;\">ssh username@web-server.com\u00a0<\/span><span style=\"font-weight: 400;\">and press the <\/span><b>Enter<\/b><span style=\"font-weight: 400;\"> key<\/span>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-family: monospace;\">username.pairserver.com<\/span> is the usual format of a Pair Network's web server. If you\u2019re not sure what your web server is, log into your <\/span><a href=\"https:\/\/my.pair.com\/\"><span style=\"font-weight: 400;\">Account Control Center<\/span><\/a><span style=\"font-weight: 400;\">. Under\u00a0<strong>Account Summary<\/strong><\/span><span style=\"font-weight: 400;\">, you will see your <strong>Web Server<\/strong> name.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"> \u00a0Enter your password and press the <\/span><b>Enter <\/b><span style=\"font-weight: 400;\">key<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Type: <\/span><span style=\"font-weight: 400; font-family: monospace;\">ps axo pid=,stat= | awk '$2~\/^Z\/ { print }'\u00a0<\/span><\/li>\n<li>Press\u00a0<strong>Enter<\/strong><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This will display the PID and status of any zombie processes existing on your server.<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2082\" src=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy.png\" alt=\"\" width=\"576\" height=\"144\" srcset=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy.png 576w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy-300x75.png 300w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy-60x15.png 60w, https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy-150x38.png 150w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/a><\/p>\n<h5>How to Fix<\/h5>\n<p><span style=\"font-weight: 400;\">Once you\u2019ve found your zombie processes, you need to get rid of them to solve the problem. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">The first step to ridding yourself of zombie processes is finding the parents. You can do this by inputting the following into your shell: <\/span><\/p>\n<pre class=\"prettyprint\"><span style=\"font-weight: 400; color: #000000;\">pstree -s -p zombie_PID<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Replace <span style=\"font-family: monospace;\">zombie_PID<\/span> with the PID of the zombie child. This will show the parent of the PID you put in. Keep in mind that this also shows the parents of the parent, but the parent you are looking for is will be directly next to the zombie child.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example: <\/span><\/p>\n<pre class=\"prettyprint\"><span style=\"font-weight: 400;\">init(1)---httpd(27117)---<\/span><strong>httpd(19531)<\/strong><span style=\"font-weight: 400;\">---php5.cgi(19646)<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400; font-family: monospace;\">httpd<\/span><span style=\"font-weight: 400;\"> next to <\/span><span style=\"font-weight: 400; font-family: monospace;\">php5.cgi<\/span><span style=\"font-weight: 400;\"> would be the parent you are looking for. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you find that many of your zombie processes have the same parent, then that program most likely has a bug that is keeping it from correctly closing its child processes. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once you have the PID of the parent, you have two options: <\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can try to send a manual command to the parent process to gather the child process\u2019 information. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Do this by : <\/span><\/p>\n<pre class=\"prettyprint\"><span style=\"font-weight: 400; color: #000000;\">kill -s SIGCHLD parent_PID<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Replace <span style=\"font-family: monospace;\">parent_PID<\/span> with the PID of the parent.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">However, this will not succeed if there is an error in the parent\u2019s programming. If this is the case, you need to close the parent process. Don\u2019t worry, you can re-open it when you finish. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Closing the parent process will send all the child process\u2019 to the <\/span><b>init<\/b><span style=\"font-weight: 400;\">, the first process started when Linux starts up. <\/span><b>init<\/b><span style=\"font-weight: 400;\"> regularly performs checks for zombie processes and will wipe the zombie processes the next time it performs a check.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Close the parent by:<\/span><\/p>\n<pre class=\"prettyprint\"><span style=\"font-weight: 400; color: #000000;\">kill parent_PID<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">This command asks the process to terminate. If the process has trouble shutting down, you can force the process to close by using:<\/span><\/p>\n<pre class=\"prettyprint\"><span style=\"font-weight: 400; color: #000000;\">Kill -KILL parent_PID<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Now, the problem may be fixed momentarily, but if you suspect the parent process has a bug that keeps it from properly closing its children processes, you may want to take steps to fix it. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the coding is your\u2019s, you can look through it and see if anything is keeping the parent process from gathering and cleaning its zombie children. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the code is not yours, you should report the bug to the code\u2019s owner. <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A 503 error message is generated on the server side to tell the user that the service is unavailable. Common Error Messages HTTP Server Error 503 503 Error HTTP 503 Http\/1.1 Service Unavailable 503 Service Unavailable Service is unavailable Service Unavailable &#8211; DNS Failure 503 errors can occur if a&#8230;<\/p>\n","protected":false},"author":11,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":[],"ht-kb-category":[24],"ht-kb-tag":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is a 503 Error? - Knowledge Base - Pair Networks<\/title>\n<meta name=\"description\" content=\"A 503 error message is generated on the server side to tell the user that the service is unavailable. Learn about potential fixes here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is a 503 Error? - Knowledge Base - Pair Networks\" \/>\n<meta property=\"og:description\" content=\"A 503 error message is generated on the server side to tell the user that the service is unavailable. Learn about potential fixes here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - Pair Networks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pairnetworks\/\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-26T17:36:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@pairNetworks\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/\",\"name\":\"What is a 503 Error? - Knowledge Base - Pair Networks\",\"isPartOf\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\"},\"datePublished\":\"2017-08-02T16:41:36+00:00\",\"dateModified\":\"2020-02-26T17:36:03+00:00\",\"description\":\"A 503 error message is generated on the server side to tell the user that the service is unavailable. Learn about potential fixes here.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pair.com\/support\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is a 503 Error?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#website\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"name\":\"Knowledge Base - Pair Networks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#organization\",\"name\":\"Pair Networks\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"contentUrl\":\"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg\",\"width\":360,\"height\":360,\"caption\":\"Pair Networks\"},\"image\":{\"@id\":\"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/pairnetworks\/\",\"https:\/\/twitter.com\/pairNetworks\",\"https:\/\/www.instagram.com\/pairnetworks\/\",\"https:\/\/www.linkedin.com\/company\/2269676\/\",\"https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/\",\"https:\/\/www.youtube.com\/user\/pairnetworks\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is a 503 Error? - Knowledge Base - Pair Networks","description":"A 503 error message is generated on the server side to tell the user that the service is unavailable. Learn about potential fixes here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/","og_locale":"en_US","og_type":"article","og_title":"What is a 503 Error? - Knowledge Base - Pair Networks","og_description":"A 503 error message is generated on the server side to tell the user that the service is unavailable. Learn about potential fixes here.","og_url":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/","og_site_name":"Knowledge Base - Pair Networks","article_publisher":"https:\/\/www.facebook.com\/pairnetworks\/","article_modified_time":"2020-02-26T17:36:03+00:00","og_image":[{"url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2017\/08\/PID-copy.png"}],"twitter_card":"summary_large_image","twitter_site":"@pairNetworks","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/","url":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/","name":"What is a 503 Error? - Knowledge Base - Pair Networks","isPartOf":{"@id":"https:\/\/www.pair.com\/support\/kb\/#website"},"datePublished":"2017-08-02T16:41:36+00:00","dateModified":"2020-02-26T17:36:03+00:00","description":"A 503 error message is generated on the server side to tell the user that the service is unavailable. Learn about potential fixes here.","breadcrumb":{"@id":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pair.com\/support\/kb\/what-is-a-503-error\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pair.com\/support\/kb\/"},{"@type":"ListItem","position":2,"name":"What is a 503 Error?"}]},{"@type":"WebSite","@id":"https:\/\/www.pair.com\/support\/kb\/#website","url":"https:\/\/www.pair.com\/support\/kb\/","name":"Knowledge Base - Pair Networks","description":"","publisher":{"@id":"https:\/\/www.pair.com\/support\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pair.com\/support\/kb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pair.com\/support\/kb\/#organization","name":"Pair Networks","url":"https:\/\/www.pair.com\/support\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","contentUrl":"https:\/\/www.pair.com\/support\/kb\/wp-content\/uploads\/2022\/02\/Gb_TUkUE_400x400.jpeg","width":360,"height":360,"caption":"Pair Networks"},"image":{"@id":"https:\/\/www.pair.com\/support\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pairnetworks\/","https:\/\/twitter.com\/pairNetworks","https:\/\/www.instagram.com\/pairnetworks\/","https:\/\/www.linkedin.com\/company\/2269676\/","https:\/\/www.pinterest.com\/pairnetworksinc\/pins\/","https:\/\/www.youtube.com\/user\/pairnetworks"]}]}},"_links":{"self":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/2076"}],"collection":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/comments?post=2076"}],"version-history":[{"count":18,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/2076\/revisions"}],"predecessor-version":[{"id":7454,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb\/2076\/revisions\/7454"}],"wp:attachment":[{"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/media?parent=2076"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=2076"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.pair.com\/support\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=2076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}