All posts

WooCommerce under load: when the host runs out of PHP workers

Page caching lets a WooCommerce store serve product pages to a crowd. The checkout is different. Every step, from cart update to shipping calculation to payment, runs PHP for that one customer, and there is a fixed number of workers to do it.

Free checkout scan

Enter your store address. A real browser adds a product to the cart and walks the checkout up to the payment step, like a customer, and shows you every step with a screenshot.

  • Free, no account
  • Stops before payment, no order
  • Nothing to install
· Updated · 2 min read
A server rack lit in green

What a PHP worker is

A worker handles one uncached request at a time. Managed WordPress hosts sell plans with a set number of them; on a VPS it is PHP-FPM’s pm.max_children. While all workers are busy, new requests wait in a queue; if they wait too long, they time out with a 502 or 504.

RequestCached?Holds a worker
Product and category pages (guest)YesNo
Cart, checkout, my-accountNoYes
?wc-ajax=* (fragments, update_checkout, checkout)NoYes
/wp-json/wc/store/* (block checkout)NoYes
Admin, WP-Cron, Action SchedulerNoYes
Bots on filtered or add-to-cart URLsOften notYes

Why checkout feels it first

Browsing keeps working, because product pages come from cache. Checkout cannot, so it is the first thing to slow down and the first to fail, at the exact moment traffic is highest.

A slow shipping or payment API makes it worse: every checkout holds its worker longer, the queue grows, and a promotion email can turn into a store that loads but will not take orders.

bash
# PHP-FPM says it ran out of workers
grep "max_children" /var/log/php*-fpm.log
# WARNING: [pool www] server reached pm.max_children setting (20), consider raising it

# nginx gave up waiting
grep -E "upstream timed out|502|504" /var/log/nginx/error.log | tail
On managed hosts the same signal appears as “PHP workers” or “entry processes” at their limit in the panel.

Preparing for it

  1. Know your limit. Ask the host how many workers you have and what happens when all are busy.
  2. Cut uncached requests. Trim cart fragments, block bots on cart and filter URLs, and move slow tasks to Action Scheduler.
  3. Speed up slow calls. Timeouts on shipping and tax APIs keep a stuck API from holding workers.
  4. Test under load. Run checkout while the site is busy, not only when it is quiet.
  5. Watch during the campaign. A checkout check every few minutes tells you when slow has become failing.
More workers need more CPU

Raising the worker count without the CPU and memory to run them makes every request slower. Size workers to the server, not the other way round.

Check your own store now with the free WooCommerce checkout checker: it walks the checkout in a real browser, stops before payment, and shows the step where it breaks.

Find out your checkout broke before your customers do.

Real checkout checks for Magento and WooCommerce · free plan · no card requiredWooCommerce checkout monitoring →
FAQ

Common questions

Still have a question?More answers, and a way to reach us.Support →
01What is a PHP worker?

A process that handles one uncached PHP request at a time. Cart, checkout and AJAX requests cannot be cached, so they all need a worker.

02How do I know the store ran out of PHP workers?

Checkout requests queue and time out with 502 or 504 errors while cached pages still load; PHP-FPM logs “reached pm.max_children” and hosting panels show the worker limit being hit.

03How do I prepare WooCommerce for a sale?

Raise the worker limit with enough CPU behind it, reduce uncached AJAX, block bots, and test the checkout under load before the sale.