{"id":290,"date":"2015-06-05T02:20:22","date_gmt":"2015-06-05T02:20:22","guid":{"rendered":"https:\/\/www.fastcomet.com\/blog\/?p=290"},"modified":"2022-06-10T07:39:13","modified_gmt":"2022-06-10T07:39:13","slug":"resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process","status":"publish","type":"post","link":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process","title":{"rendered":"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process"},"content":{"rendered":"\n<p class=\"has-drop-cap\"><strong>WordPress Heartbeat<\/strong> is an API introduced in <strong>version 3.6<\/strong> back in the days. This API simulates the bidirectional connection between the client browser and the server where the WordPress site is hosted. The API features many implementations but the most important are:<\/p>\n\n\n\n<!--more-->\n\n\n\n<ul class=\"wp-block-list\"><li style=\"text-align: justify;\">Live communication between the client&#8217;s browser and the web-server with Ajax (no web page refresh needed)<\/li><li style=\"text-align: justify;\">Improved user session management<\/li><li style=\"text-align: justify;\">Tracking of different post revisions<\/li><li style=\"text-align: justify;\">Auto-Saving posts<\/li><\/ul>\n\n\n\n<p>With such features, it is undoubtedly quite a handy tool that is fully enabled by default in WordPress.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem<\/h2>\n\n\n\n<p>Recently we discovered that due to the Heartbeat functionality, our <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.fastcomet.com\/compare-shared-package\" target=\"_blank\">Shared Hosting<\/a> clients are experienced a major issue with the resource consumption of their websites. It appears that in order for the WordPress Heartbeat to work properly, it spawns an additional <strong><em>admin-ajax.php<\/em><\/strong> process, which is making the Ajax requests to the <em>index.php<\/em> file of the wp-admin section.<\/p>\n\n\n\n<p>Here is a simple example:<\/p>\n\n\n\n<p><code>00:45:11 \"POST \/wp-admin\/admin-ajax.php \"http:\/\/example.com\/wp-admin\/index.php\"<\/code><br><code>00:45:67 \"POST \/wp-admin\/admin-ajax.php \"http:\/\/example.com\/wp-admin\/index.php\"<\/code><\/p>\n\n\n\n<p>This is resulting in the constant spawn of new admin-ajax.php processes which are consuming quite a lot of resources:<\/p>\n\n\n\n<p><code>503 user 20 0 358m 33.8 0.2 0:00.35 \/home\/user\/public_html\/wp-admin\/admin-ajax.php<\/code><br><code>508 user 20 0 387m 25.1 0.4 0:00.79 \/home\/user\/public_html\/wp-admin\/admin-ajax.php<\/code><\/p>\n\n\n\n<p>The amount of spawned processes sometimes exceeds the number of allowed processes on our Shared Hosting environment, and this is resulting in 508 &#8211; &#8220;Resource limit reached&#8221;. This error can also be received if there is no CPU\/RAM available for your account. That can happen because it has reached the virtually assigned limits or the hardware limitation in case you are using a service like our Dedicated Servers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>The only common solution applicable by every WordPress user is actually quite a simple one &#8211; <strong>You need to either disable the Heartbeat API or you need a way to control it.<\/strong><\/p>\n\n\n\n<p>To control the API, you need to be fully aware of what it does, and also you should be well familiar with the code and the functionality of the WordPress application. In case you do not have the time to spare in order to check all the whitepapers, you should read the next few lines of this post.<\/p>\n\n\n\n<p>The simplest and most effective solution to this issue is to install a plugin called <strong>Heartbeat Control<\/strong>. If you are not quite sure how to do that, please check our &#8220;<a href=\"https:\/\/www.fastcomet.com\/tutorials\/wordpress\/managing-plugins\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Managing the plugins of your website<\/a>&#8221; tutorial, where you will receive detailed and well-structured information on how to perform plugin installations.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/heartbeat-control-plugin-installation.png\" alt=\"Heartbeat Control Plugin Installation\" class=\"wp-image-5050\" srcset=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/heartbeat-control-plugin-installation.png 1024w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/heartbeat-control-plugin-installation-300x141.png 300w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/heartbeat-control-plugin-installation-768x362.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Once you install the plugin, you will need to activate it, and then an additional item named <strong>Heartbeat Control<\/strong> will emerge into the <strong>Settings<\/strong> menu of your WordPress application.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"333\" src=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/access-heartbeat-control-plugin-settings.png\" alt=\"Access Heartbeat Control Plugin Settings\" class=\"wp-image-5051\" srcset=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/access-heartbeat-control-plugin-settings.png 1024w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/access-heartbeat-control-plugin-settings-300x98.png 300w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/access-heartbeat-control-plugin-settings-768x250.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>If you click on that item, you will see quite a simple interface for the management of the Heartbeat API. Here you can use the <strong>Disable Heartbeat<\/strong> options to stop the API in your <strong>WordPress Dashboard<\/strong>, <strong>Frontend<\/strong>, or <strong>Post Editor<\/strong> sections. Click on the <strong>Save Changes<\/strong> button to preserve the configuration.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"568\" src=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/modify-heartbeat-control-settings-in-wordpress.png\" alt=\"Modify Heartbeat Control Settings in WordPress\" class=\"wp-image-5052\" srcset=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/modify-heartbeat-control-settings-in-wordpress.png 1024w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/modify-heartbeat-control-settings-in-wordpress-300x166.png 300w, https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/modify-heartbeat-control-settings-in-wordpress-768x426.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">The Conclusion<\/h2>\n\n\n\n<p>Heartbeat is not mandatory for your WordPress website to work properly, and indeed this is the reason why sometimes WordPress owners are experiencing severe resource consumption issues with their web hosting services. FastComet fully supports the suggested fix, and we will gladly apply it for any customer of our services who would like to boost the performance of the used WordPress application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress Heartbeat is an API introduced in version 3.6 back in the days. This API simulates the bidirectional connection between the client browser and the server where the WordPress site is hosted. The API features many implementations but the most important are:<\/p>\n","protected":false},"author":5,"featured_media":606,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,256],"tags":[138,139,44],"class_list":["post-290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-optimization","category-wordpress","tag-ajax","tag-heartbeat","tag-wordpress"],"featured_image_src":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg","author_info":{"display_name":"Christopher","author_link":"https:\/\/www.fastcomet.com\/blog\/author\/christopher"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process | FastComet<\/title>\n<meta name=\"description\" content=\"Learn how to diagnose high Admin-Ajax usage spikes on your WordPress site. ? Here&#039;s how to fix it using the Heartbeat Control plugin.\" \/>\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.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process | FastComet\" \/>\n<meta property=\"og:description\" content=\"Learn how to diagnose high Admin-Ajax usage spikes on your WordPress site. ? Here&#039;s how to fix it using the Heartbeat Control plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process\" \/>\n<meta property=\"og:site_name\" content=\"FastComet Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-05T02:20:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-10T07:39:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Christopher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process | FastComet","description":"Learn how to diagnose high Admin-Ajax usage spikes on your WordPress site. ? Here's how to fix it using the Heartbeat Control plugin.","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.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process","og_locale":"en_US","og_type":"article","og_title":"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process | FastComet","og_description":"Learn how to diagnose high Admin-Ajax usage spikes on your WordPress site. ? Here's how to fix it using the Heartbeat Control plugin.","og_url":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process","og_site_name":"FastComet Blog","article_published_time":"2015-06-05T02:20:22+00:00","article_modified_time":"2022-06-10T07:39:13+00:00","og_image":[{"width":1024,"height":550,"url":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg","type":"image\/jpeg"}],"author":"Christopher","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Christopher","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#article","isPartOf":{"@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process"},"author":{"name":"Christopher","@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/e70bae8b5451b247e36928e336317827"},"headline":"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process","datePublished":"2015-06-05T02:20:22+00:00","dateModified":"2022-06-10T07:39:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process"},"wordCount":540,"commentCount":9,"image":{"@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#primaryimage"},"thumbnailUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg","keywords":["ajax","heartbeat","wordpress"],"articleSection":["Performance Optimization","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process","url":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process","name":"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process | FastComet","isPartOf":{"@id":"https:\/\/www.fastcomet.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#primaryimage"},"image":{"@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#primaryimage"},"thumbnailUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg","datePublished":"2015-06-05T02:20:22+00:00","dateModified":"2022-06-10T07:39:13+00:00","author":{"@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/e70bae8b5451b247e36928e336317827"},"description":"Learn how to diagnose high Admin-Ajax usage spikes on your WordPress site. ? Here's how to fix it using the Heartbeat Control plugin.","breadcrumb":{"@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#primaryimage","url":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg","contentUrl":"https:\/\/www.fastcomet.com\/blog\/wp-content\/uploads\/2015\/06\/WordPress-Heartbeat.jpg","width":1024,"height":550},{"@type":"BreadcrumbList","@id":"https:\/\/www.fastcomet.com\/blog\/resolve-high-resource-consumption-of-wordpress-admin-ajax-php-process#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fastcomet.com\/blog"},{"@type":"ListItem","position":2,"name":"How to Resolve the High Resource Consumption of WordPress Admin-ajax.php Process"}]},{"@type":"WebSite","@id":"https:\/\/www.fastcomet.com\/blog\/#website","url":"https:\/\/www.fastcomet.com\/blog\/","name":"FastComet Blog","description":"FastComet Web Hosting Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fastcomet.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/e70bae8b5451b247e36928e336317827","name":"Christopher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fastcomet.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/99f135e26f1ad748551251c1956e4aae0bd3bcc11af8e071075359b134894941?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/99f135e26f1ad748551251c1956e4aae0bd3bcc11af8e071075359b134894941?s=96&d=mm&r=g","caption":"Christopher"},"description":"Christopher has many years of experience leading teams in the fields of Technical support, Server Administration, and Product Development. He mainly works on the backend, helping to create the infrastructure that powers FastComet. He is responsible for flawless migrations and quick and efficient answers to client questions. He also monitors our network status and jumps in to solve time-sensitive issues like DDoS attacks and stops malicious attempts in their tracks. Christopher\u2019s primarily responsible for making sure that our servers purr along, and has worked tirelessly to improve automation at FastComet.","sameAs":["https:\/\/www.fastcomet.com"],"url":"https:\/\/www.fastcomet.com\/blog\/author\/christopher"}]}},"_links":{"self":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/comments?post=290"}],"version-history":[{"count":8,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":7954,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/posts\/290\/revisions\/7954"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/media\/606"}],"wp:attachment":[{"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/media?parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/categories?post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fastcomet.com\/blog\/wp-json\/wp\/v2\/tags?post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}