{"id":33498,"date":"2017-12-18T14:36:42","date_gmt":"2017-12-18T20:36:42","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=support&#038;p=33498"},"modified":"2025-07-28T11:05:21","modified_gmt":"2025-07-28T17:05:21","slug":"php-workers-request-prioritization","status":"publish","type":"support","link":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/","title":{"rendered":"PHP Workers and Request Prioritization"},"content":{"rendered":"<p>In this article we explain the unique way WP Engine handles request prioritization when there is too much uncached traffic for the PHP Workers to handle.<\/p>\n\n\n\n\n\n<a name=\"what\"><\/a>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\">\n\n\n\n<h2 class=\"wp-block-heading\">PHP Workers<\/h2>\n\n\n\n<p>Each uncached page request to your website is handled by a <b><i><strong>PHP Worker<\/strong><\/i><\/b>. You can think of these PHP Workers as cashiers in a store: each cashier handles one customer at a time, just as each PHP worker executes the PHP code that makes up a web page when a request comes in.<\/p>\n\n\n\n<p>Due to WP Engine\u2019s proprietary multi-tiered Evercache\u00ae system, many page requests are <a href=\"https:\/\/wpengine.com\/support\/cache\/#server\">served from cache<\/a> and therefore many requests are <strong>not<\/strong> handled by a PHP worker. Serving a request from cache would be like a customer who comes in to pick up an order that\u2019s already been completed. It\u2019s fast and efficient, and doesn\u2019t burden the cashiers who need to be available for new customers and their unique orders.<\/p>\n\n\n\n<p>When every cashier is occupied with a transaction, a queue of waiting customers is formed. Similarly, when the PHP workers can\u2019t finish requests more quickly than they\u2019re coming in, a backlog is created.<br><a name=\"wpe\"><\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\">\n\n\n\n<h2 class=\"wp-block-heading\">WP Engine Queuing Benefits<\/h2>\n\n\n\n<p>Where most hosts simply serves all traffic on a \u201cfirst come, first served\u201d basis, WP Engine understands that your site needs to reach <em>real<\/em> users first. On WP Engine, our unique traffic shaping system prioritizes real users above requests from bots, crawlers, and <a href=\"https:\/\/wpengine.com\/support\/admin-ajax\/\">AJAX<\/a> requests. That means your site will always serve real users first.<\/p>\n\n\n\n<p>Another way to visualize this is to look at the way many stores divide checkout lines into full service, \u201c10 items or less\u201d, and self-checkout lanes. Traffic can be divided and prioritized in ways ensuring that as many transactions as possible can be processed efficiently. In this way the traffic overburdens neither the customers nor the cashiers.<\/p>\n\n\n\n<p>Another dilemma other hosts present is that when a server is barraged with uncached traffic, they simply begin denying all new requests. On WP Engine our system intelligently chooses oldest waiting requests to be rejected. This allows your site to still accept new traffic in the process. That means instead of high traffic simply taking your site down, your site can still support new traffic continuously through it.<br><a name=\"queue\"><\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\">\n\n\n\n<h2 class=\"wp-block-heading\">Traffic Queueing<\/h2>\n\n\n\n<p>WP Engine segments traffic into several queues, the queues then have their own level of priority to feed into the PHP workers. Requests are sorted in the following order:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Traffic is sorted by account\n<ul class=\"wp-block-list\">\n<li>When one account (including all environments on it) is getting excess traffic, PHP workers are still available for other accounts (and all of their environments) on the server.<\/li>\n\n\n\n<li>This means only requests to environments on one account will impact that account\u2019s queue.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Traffic is sorted by type or source\n<ul class=\"wp-block-list\">\n<li>Real, human end-user traffic is grouped together in the <em>highest<\/em> priority queue (most likely to be processed)<\/li>\n\n\n\n<li>AJAX and XMLRPC request are grouped together in a <em>low<\/em> priority queue (more likely to be evicted from queue)<\/li>\n\n\n\n<li>Well-known bot requests are grouped together at in a <em>low<\/em> priority queue (more likely to be evicted from queue)<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>This queueing system allows the PHP workers to serve the requests as they come in. If the server can\u2019t immediately process a request, it will prioritize the real end users of your website above anything else.<\/p>\n\n\n\n<p>This structure also means that crawling or remote monitoring services, which operate off of bots, could return errors if their crawl rate is too high and their queue is being impacted. This doesn\u2019t necessarily always indicate an issue with server health.<br><a name=\"bestpractice\"><\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\">\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<p>Our request prioritization and traffic shaping system does a lot of work to protect your site. However, there are some known plugins to steer away from. The following plugins tend to overwhelm your PHP Workers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>View\/Share counter plugins<\/li>\n\n\n\n<li>Plugins that generate popups<\/li>\n\n\n\n<li>Ad plugins which hit <code>admin-ajax.php<\/code><\/li>\n<\/ul>\n\n\n\n<p>These types of plugins tend to trigger large amounts of uncached traffic to your site, which is compounded when your site is already receiving heavy traffic. If possible, we recommend using any caching settings available for these types of plugins, or avoiding use altogether. This will help ensure your site can scale to better support higher traffic.<\/p>\n\n\n\n<p>A more extensive, updated list can always be found in our <a href=\"https:\/\/wpengine.com\/support\/disallowed-plugins\/\">disallowed plugins guide here<\/a>.<\/p>\n\n\n\n<a name=\"504\"><\/a>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\">\n\n\n\n<h2 class=\"wp-block-heading\">Too Many Requests<\/h2>\n\n\n\n<p>When the all PHP workers and the backlog queue are full, this is where you may begin to see errors such as 504 and 502. There are 3 primary reasons you may see errors due to PHP worker queuing.<\/p>\n\n\n\n<div style=\"color:#32373c;background-color:#00d1b2\" class=\"wp-block-genesis-blocks-gb-notice gb-font-size-18 gb-block-notice\" data-id=\"10de4b\"><div class=\"gb-notice-title\" style=\"color:#fff\"><p>NOTE<\/p><\/div><div class=\"gb-notice-text\" style=\"border-color:#00d1b2\">\n<p>Bots, AJAX and XMLRPC will see these errors well before real users, due to queue priority.<\/p>\n<\/div><\/div>\n\n\n\n<p>A 504 error can occur when too many items are in the backlog and items are evicted.<br>A 502 error can occur when items are taking too long to process and are killed to free up the PHP worker for other requests.<\/p>\n\n\n\n<p>Both issues are typically straightforward to resolve once you\u2019ve identified the source of the troublesome requests. If you see errors such as these on your site and aren\u2019t able to pinpoint the issue, our <a href=\"https:\/\/my.wpengine.com\/support\">24\u00d77 Support team<\/a> is always standing by ready to help!<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Too many uncached requests<\/strong>\n<ul class=\"wp-block-list\">\n<li>This is typically accompanied by a 504 error. <a href=\"https:\/\/wpengine.com\/support\/error\/#accesslogs\">Learn how to find your access logs to check for a 504.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wpengine.com\/support\/resolving-504-gateway-timeout-errors\/\">Review our guide for triaging 504 errors<\/a><\/li>\n\n\n\n<li>If you have services crawling your website, pause or <a href=\"https:\/\/wpengine.com\/support\/read-use-robots-txt\/#crawldelay\">adjust the crawl delay<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wpengine.com\/support\/tips-improving-page-cacheability\/\">Improve your website\u2019s cacheability<\/a> <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Uncached requests are taking too long to process<\/strong>\n<ul class=\"wp-block-list\">\n<li>This is almost always accompanied by a 502 error. <a href=\"https:\/\/wpengine.com\/support\/error\/#accesslogs\">Learn how to find your access logs to check for a 502.<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wpengine.com\/support\/troubleshooting-502-error\/\">Review our guide for triaging 502 errors<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wpengine.com\/support\/troubleshoot-wordpress\/\">Troubleshoot your website for slowness<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wpengine.com\/support\/database-optimization-best-practices\/\">Optimize your database<\/a> <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>More PHP workers are needed<\/strong>\n<ul class=\"wp-block-list\">\n<li>If the site cannot be further optimized and all the requests are legitimate, then it seems your business has successfully scaled up! It\u2019s most likely time to upgrade to a larger server with more PHP workers.<\/li>\n\n\n\n<li><a href=\"https:\/\/wpengine.com\/contact\/#form\">Reach out to your account manager.<\/a> <\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\">\n\n\n\n<p><strong>NEXT STEP: <a href=\"https:\/\/wpengine.com\/support\/resolving-504-gateway-timeout-errors\/\">Learn more about 504 errors<\/a><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.<\/p>\n","protected":false},"featured_media":126216,"template":"","meta":{"_acf_changed":false,"mediapress_authors_byline":[],"mediapress_draft_name":"","_mediapress_is_draft_copy":false},"support-categories":[8,6],"support-tag":[26,28,83],"mediapress_author":[],"class_list":["post-33498","support","type-support","status-publish","has-post-thumbnail","hentry","support-categories-general-wp-engine-info","support-categories-platform","support-tag-cache","support-tag-php","support-tag-robots"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP Workers and Request Prioritization - Support Center<\/title>\n<meta name=\"description\" content=\"Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Workers and Request Prioritization - Support Center\" \/>\n<meta property=\"og:description\" content=\"Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/\" \/>\n<meta property=\"og:site_name\" content=\"Support Center\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-28T17:05:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/support\/wp-content\/uploads\/2019\/12\/wp-engine-featured-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/\",\"name\":\"PHP Workers and Request Prioritization - Support Center\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpengine.com\\\/support\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/wp-engine-featured-image.png\",\"datePublished\":\"2017-12-18T20:36:42+00:00\",\"dateModified\":\"2025-07-28T17:05:21+00:00\",\"description\":\"Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wpengine.com\\\/support\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/wp-engine-featured-image.png\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/support\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/wp-engine-featured-image.png\",\"width\":1200,\"height\":630,\"caption\":\"WP Engine\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/php-workers-request-prioritization\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpengine.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Support Posts\",\"item\":\"https:\\\/\\\/wpengine.com\\\/support\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP Workers and Request Prioritization\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/wpengine.com\\\/support\\\/\",\"name\":\"Support Center\",\"description\":\"WP Engine&#039;s Support Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wpengine.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Workers and Request Prioritization - Support Center","description":"Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.","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:\/\/wpengine.com\/support\/php-workers-request-prioritization\/","og_locale":"en_US","og_type":"article","og_title":"PHP Workers and Request Prioritization - Support Center","og_description":"Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.","og_url":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/","og_site_name":"Support Center","article_modified_time":"2025-07-28T17:05:21+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/wpengine.com\/support\/wp-content\/uploads\/2019\/12\/wp-engine-featured-image.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/","url":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/","name":"PHP Workers and Request Prioritization - Support Center","isPartOf":{"@id":"https:\/\/wpengine.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/#primaryimage"},"image":{"@id":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/#primaryimage"},"thumbnailUrl":"https:\/\/wpengine.com\/support\/wp-content\/uploads\/2019\/12\/wp-engine-featured-image.png","datePublished":"2017-12-18T20:36:42+00:00","dateModified":"2025-07-28T17:05:21+00:00","description":"Learn what PHP workers are and how WP Engine handles prioritizes requests when there is too much uncached traffic for your PHP Workers to handle.","breadcrumb":{"@id":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/#primaryimage","url":"https:\/\/wpengine.com\/support\/wp-content\/uploads\/2019\/12\/wp-engine-featured-image.png","contentUrl":"https:\/\/wpengine.com\/support\/wp-content\/uploads\/2019\/12\/wp-engine-featured-image.png","width":1200,"height":630,"caption":"WP Engine"},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/support\/php-workers-request-prioritization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/support\/"},{"@type":"ListItem","position":2,"name":"Support Posts","item":"https:\/\/wpengine.com\/support\/support\/"},{"@type":"ListItem","position":3,"name":"PHP Workers and Request Prioritization"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/support\/#website","url":"https:\/\/wpengine.com\/support\/","name":"Support Center","description":"WP Engine&#039;s Support Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/support\/33498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/types\/support"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/media\/126216"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/media?parent=33498"}],"wp:term":[{"taxonomy":"support-categories","embeddable":true,"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/support-categories?post=33498"},{"taxonomy":"support-tag","embeddable":true,"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/support-tag?post=33498"},{"taxonomy":"mediapress_author","embeddable":true,"href":"https:\/\/wpengine.com\/support\/wp-json\/wp\/v2\/mediapress_author?post=33498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}