High CPU Usage in WooCommerce – Cart Fragments, Cron & Sessions Explained

design
High CPU usage in WooCommerce caused by cart fragments, cron jobs, and session handling

If your hosting provider is warning you about high CPU usage, slow response times, or temporary throttling, WooCommerce is often at the center of the problem.

The tricky part? CPU spikes in WooCommerce rarely come from one single issue. In most cases, they’re caused by a combination of cart fragments, background cron jobs, and session handling, all stacking together under real traffic.

In this guide, we’ll break down exactly why WooCommerce causes high CPU usage, how to identify the real culprit, and how these issues connect behind the scenes—so you can fix the problem properly instead of guessing.


What High CPU Usage Means in WooCommerce (Plain English)

High CPU usage means your server is spending too much processing power handling requests. When this happens, you’ll usually see:

  • Slow frontend load times
  • Sluggish WooCommerce admin
  • Checkout delays or timeouts
  • Hosting warnings, throttling, or even temporary suspension

On WooCommerce sites, CPU usage often spikes before memory or disk limits do—especially on shared or mid-tier VPS hosting.

The reason is simple: WooCommerce performs a lot of dynamic operations, even on pages that look static.


How to Confirm WooCommerce Is the CPU Culprit

Before fixing anything, you need to confirm WooCommerce is actually responsible.

Common signs include:

  • CPU spikes when traffic increases, even without sales
  • High request counts to:
    • wc-ajax=get_refreshed_fragments
    • wp-cron.php
  • Large or constantly growing database tables like:
    • wp_woocommerce_sessions
    • wp_actionscheduler_actions

Most hosts (Kinsta, WP Engine, Cloudways, cPanel-based hosts) will show these patterns clearly in CPU or request logs.

Once you see those names repeating, you’re in WooCommerce territory.


Cart Fragments: Small Script, Big CPU Cost

WooCommerce loads cart fragments to keep the cart count and mini cart updated using AJAX.

This triggers the request:

?wc-ajax=get_refreshed_fragments

Why Cart Fragments Spike CPU

  • Loaded site-wide by default
  • Fires AJAX requests even when the cart is empty
  • Bypasses page caching
  • Multiplies with traffic (100 visitors = 100 AJAX calls)

On high-traffic or cached sites, this creates a constant background load that never sleeps.

This is especially dangerous when:

  • You’re running ads
  • Bots are crawling the site
  • Logged-out users are browsing content pages

👉 This is why selectively disabling cart fragments is one of the biggest CPU wins.


WooCommerce Cron Jobs and Scheduled Actions

WooCommerce relies heavily on WP-Cron, WordPress’s pseudo-cron system that runs on page loads.

On WooCommerce sites, this includes:

  • Order cleanup
  • Expired carts
  • Email schedules
  • Subscriptions (if used)
  • Action Scheduler tasks

Why WP-Cron Causes CPU Spikes

  • Runs during normal page requests
  • Can fire multiple jobs at once
  • Executes PHP + database operations together
  • Scales poorly with traffic

The Action Scheduler system is the biggest offender here. When tasks pile up, WooCommerce tries to “catch up,” causing massive CPU spikes.

Common warning signs:

  • Thousands of pending scheduled actions
  • Repeated cron execution per minute
  • CPU spikes even with low traffic

This is one of the most common causes of random CPU surges on WooCommerce stores.


WooCommerce Sessions and Database Pressure

WooCommerce stores cart and session data in the database table:

wp_woocommerce_sessions

Each active visitor creates a session—even logged-out users.

Why Sessions Increase CPU Usage

  • Table grows rapidly on busy sites
  • Old sessions don’t always clean up properly
  • Large session tables slow down reads/writes
  • Every cart or checkout action touches this table

On stores with traffic but low conversions, this table becomes a silent CPU killer.

If your sessions table has hundreds of thousands of rows, CPU spikes are almost guaranteed.


The Real Problem: These Issues Stack Together

Here’s what actually happens on struggling WooCommerce sites:

  1. Cart fragments fire AJAX requests
  2. Each request bypasses cache
  3. WP-Cron runs during those requests
  4. Scheduled actions execute
  5. Sessions table gets queried
  6. CPU usage spikes

Individually, these aren’t catastrophic.
Together, they overwhelm the server.

This is why disabling just one thing often doesn’t fully solve the issue—you have to understand how they interact.


How to Fix High CPU Usage in WooCommerce (High-Level)

This post focuses on explaining the problem, but the fixes usually involve:

  • Disabling cart fragments selectively
  • Optimizing or replacing WP-Cron with real cron
  • Cleaning and managing WooCommerce sessions
  • Reducing unnecessary AJAX calls
  • Improving cache compatibility

Each of these deserves its own focused solution—which is why linking them properly matters.


How to Monitor CPU After Fixes

After applying optimizations, monitor:

  • CPU usage over 24–72 hours
  • AJAX request volume
  • Cron execution frequency
  • Database table growth

If CPU stabilizes while traffic stays the same, you’ve fixed the real issue—not just masked symptoms.


Why This Issue Keeps Coming Back

Many WooCommerce stores grow without adjusting server behavior. What worked at 1,000 visits/month breaks at 50,000 visits/month.

WooCommerce isn’t “bad”—it’s just dynamic by default, and dynamic systems need intentional optimization.

Understanding why CPU usage spikes is the difference between constant firefighting and long-term stability.

FAQs: High CPU Usage in WooCommerce

WooCommerce is highly dynamic and runs background processes like cart fragments, cron jobs, and session handling on many page loads. When traffic increases, these processes stack together and can overwhelm server CPU resources.

The most common causes are excessive cart fragment AJAX requests, overloaded WP-Cron jobs, and large WooCommerce session tables. These issues often occur simultaneously, not individually.

Cart fragments trigger wc-ajax=get_refreshed_fragments requests to keep cart data updated. These requests bypass caching and run PHP and database queries, which increases CPU usage—especially on high-traffic sites.

Yes. WooCommerce relies on WP-Cron to run scheduled tasks. When traffic is high or scheduled actions pile up, WP-Cron can execute multiple heavy tasks during page loads, causing CPU spikes.

WooCommerce stores visitor cart data in the wp_woocommerce_sessions table. On busy sites, this table can grow very large, slowing database queries and increasing CPU usage during cart and checkout activity.

Check your hosting logs or monitoring tools for repeated requests to wc-ajax, wp-cron.php, or large WooCommerce database tables. If CPU usage rises with traffic—even without sales—WooCommerce is likely the source.

Yes. Disabling WooCommerce cart fragments selectively can significantly reduce background AJAX requests and lower CPU usage without breaking cart functionality.

Disabling WP-Cron and replacing it with a real server cron job is often recommended for high-traffic WooCommerce sites, as it prevents cron tasks from running during user requests.

Yes. When CPU usage is maxed out, WooCommerce checkout pages may load slowly or fail, and the WordPress admin can become unresponsive.

The best fix is a combination of selective cart fragment disabling, optimized cron handling, session cleanup, and proper caching—rather than relying on a single tweak.

Meet the Author

Babar khan

Babar Ilyas is a full-stack WordPress developer and SEO strategist focused on building fast, functional, and search-optimized websites. With years of hands-on experience, he shares real-world fixes and dev workflows that actually work.
When he’s not deep in code, he’s dropping fresh blog posts and tracking what Google’s up to — one ranking at a time.
Leave a Reply

Your email address will not be published. Required fields are marked *

    Branding Design Development Front-End Website-Redesigning Shopify-Development WordPress-Development
    Branding Design Development Front-End Website-Redesigning Shopify-Development WordPress-Development
    We love crafting unforgettable
    digital experiences, brands and websites with people like you.
    Follow us:
    Let’s get started
    We'd love to hear about your project.
    © 2025 babarilyas. All rights reserved.