{"id":13944,"date":"2024-09-05T11:56:59","date_gmt":"2024-09-05T11:56:59","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=13944"},"modified":"2024-09-05T11:57:58","modified_gmt":"2024-09-05T11:57:58","password":"","slug":"how-to-kill-python-processes-on-cpanel","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/","title":{"rendered":"How to kill Python or Nodejs processes on cpanel"},"content":{"rendered":"\n<p>At times, you may try  accessing your python app or nodejs app and you get an error 503.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Checking on cpanel, you notice that you have reached the processes limit. <\/p>\n\n\n\n<p>Thus, you may need to kill these processes for your app to continue working.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Here are the steps. <\/p>\n\n\n\n<p><strong>1. Login to cpanel. <\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>2.  Go to Advanced Section and Locate &#8220;Terminal&#8221; <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"298\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png\" alt=\"\" class=\"wp-image-13945\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-300x87.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-768x223.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31.png 1066w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong><em>NOTE: If you cannot locate this feature, reach out to support and request for terminal to be enabled on your cpanel. <\/em><\/strong><\/p>\n\n\n\n<p><strong>3. Lists all running processes by typing<\/strong><\/p>\n\n\n\n<p><code>ps faux <\/code><\/p>\n\n\n\n<p><strong>Output<\/strong>. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"371\" src=\"http:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/processes-1024x371.png\" alt=\"\" class=\"wp-image-13946\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/processes-1024x371.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/processes-300x109.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/processes-768x278.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/processes.png 1050w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>To kill All processes associated with Python, type the command below.<\/strong><\/p>\n\n\n\n<p><code>kill -9 $(ps faux | grep python | grep -v grep | awk {'print $2'})<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>To kill All processes associated with Nodejs, type the command below. <\/strong><\/p>\n\n\n\n<p><code>kill -9 $(ps faux | grep node | grep -v grep | awk {'print $2'})<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"244\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-32-1024x244.png\" alt=\"\" class=\"wp-image-13947\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-32-1024x244.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-32-300x71.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-32-768x183.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-32.png 1051w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>When you run the <code>ps faux<\/code> again, you will notice that we no longer have the node and python processes running. <\/p>\n\n\n\n<p><strong>Explanation. <\/strong><\/p>\n\n\n\n<p>This command does the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>ps faux<\/code>: Lists all running processes.<\/li>\n\n\n\n<li><code>grep python<\/code>\/<code>node<\/code>: Filters for processes that include &#8220;python&#8221; or &#8220;node&#8221;. <\/li>\n\n\n\n<li><code>grep -v grep<\/code>: Excludes the <code>grep<\/code> process itself from the results.<\/li>\n\n\n\n<li><code>awk {'print $2'}<\/code>: Extracts the process IDs (PIDs) from the list.<\/li>\n\n\n\n<li><code>kill -9 $(...)<\/code>: Forcefully terminates the processes by their PIDs.<\/li>\n<\/ol>\n\n\n\n<p>You can also create a cronjob on cpanel to do the same for you. <\/p>\n\n\n\n<p>Below is a sample to run every 10 minutes. <\/p>\n\n\n\n<p><code>*\/10 * * * * kill -9 $(ps faux | grep python | grep -v grep | awk {'print $2'})<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At times, you may try accessing your python app or nodejs app and you get an error 503. Checking on cpanel, you notice that you have reached the processes limit. Thus, you may need to kill these processes for your app to continue working. Here are the steps. 1. Login to cpanel. 2. Go to [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1822],"doc_tag":[],"class_list":["post-13944","docs","type-docs","status-publish","hentry","doc_category-cpanel"],"year_month":"2026-06","word_count":242,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Kibera","author_nicename":"dan-k","author_url":"https:\/\/truehost.com\/support\/author\/dan-k\/"},"doc_category_info":[{"term_name":"Cpanel","term_url":"https:\/\/truehost.com\/support\/docs-category\/cpanel\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to kill Python or Nodejs processes on cpanel -<\/title>\n<meta name=\"description\" content=\"How to resolve error 503 for python and nodejs apps and the error &quot;Can&#039;t acquire lock for app:app on cpanel ...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to kill Python or Nodejs processes on cpanel -\" \/>\n<meta property=\"og:description\" content=\"How to resolve error 503 for python and nodejs apps and the error &quot;Can&#039;t acquire lock for app:app on cpanel ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-05T11:57:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/\",\"name\":\"How to kill Python or Nodejs processes on cpanel -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/image-31-1024x298.png\",\"datePublished\":\"2024-09-05T11:56:59+00:00\",\"dateModified\":\"2024-09-05T11:57:58+00:00\",\"description\":\"How to resolve error 503 for python and nodejs apps and the error \\\"Can't acquire lock for app:app on cpanel ...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/image-31-1024x298.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/09\\\/image-31-1024x298.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-kill-python-processes-on-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to kill Python or Nodejs processes on cpanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to kill Python or Nodejs processes on cpanel -","description":"How to resolve error 503 for python and nodejs apps and the error \"Can't acquire lock for app:app on cpanel ...","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:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to kill Python or Nodejs processes on cpanel -","og_description":"How to resolve error 503 for python and nodejs apps and the error \"Can't acquire lock for app:app on cpanel ...","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/","article_modified_time":"2024-09-05T11:57:58+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/","name":"How to kill Python or Nodejs processes on cpanel -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png","datePublished":"2024-09-05T11:56:59+00:00","dateModified":"2024-09-05T11:57:58+00:00","description":"How to resolve error 503 for python and nodejs apps and the error \"Can't acquire lock for app:app on cpanel ...","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/09\/image-31-1024x298.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-kill-python-processes-on-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to kill Python or Nodejs processes on cpanel"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/13944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=13944"}],"version-history":[{"count":2,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/13944\/revisions"}],"predecessor-version":[{"id":13949,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/13944\/revisions\/13949"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=13944"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=13944"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=13944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}