XStore Swatches Filter widgets causing huge WooCommerce layered nav transients and server overload

This topic has 5 replies, 2 voices, and was last updated 1 hour, 36 minutes ago ago by Elgaroe

  • Avatar: Elgaroe
    Elgaroe
    Participant
    September 1, 2026 at 08:39

    Hello,

    We are experiencing a serious performance issue on a WooCommerce store using XStore and the XStore “Swatches Filter” widgets.

    The shop sidebar was using three XStore Swatches Filter widgets for the following WooCommerce attributes:

    pa_color
    pa_talla (size)
    pa_copa (cup size)

    The widgets were configured with query type AND, with product counts, search and AJAX preload disabled.

    We noticed that WooCommerce’s wc_layered_nav_counts transients associated with these filters were continuously growing in the wp_options table (qtd_options in our installation).

    During normal monitoring, we observed them progressively increasing over several days. Immediately before the server became severely overloaded, their sizes were:

    _transient_wc_layered_nav_counts_pa_copa: 8.58 MB
    _transient_wc_layered_nav_counts_pa_talla: 4.92 MB
    _transient_wc_layered_nav_counts_pa_color: 4.89 MB

    All of them had autoload = off.

    At the same time, a simple query measuring these transients increased from approximately 0.81 seconds under normal conditions to 5.46 seconds during the performance problem.

    The problem became severe enough that:

    The WooCommerce store became extremely slow.
    WordPress Admin became extremely slow/unavailable.
    The server’s real RAM usage increased to approximately 7–8 GB out of 9 GB.
    Other websites hosted on the same server also became slow.
    Eventually the WooCommerce website started returning 502 Bad Gateway errors.

    We deleted ONLY the following WooCommerce layered navigation transients and their timeout entries:

    pa_color
    pa_talla
    pa_copa

    Immediately after deleting them, the server and all websites became responsive again.

    WooCommerce recreated the transients almost immediately, but initially they were only approximately 0.01 MB each, and the same SQL query then completed in approximately 0.63 seconds.

    We then removed the three XStore Swatches Filter widgets from the shop sidebar.

    After removing the widgets and navigating through the website, the transients remain extremely small:

    pa_talla: 0.02 MB
    pa_color: 0.02 MB
    pa_copa: 0.01 MB

    The SQL query now completes in approximately 0.24 seconds, and the server/websites are running normally again.

    We have therefore temporarily disabled these XStore filter widgets because we cannot risk this WooCommerce store affecting every other website hosted on the server.

    The site is currently using:

    WooCommerce: 11.0.1
    XStore: 9.7.7
    XStore Core: updated to the latest compatible version.

    Could you please investigate whether there is a known issue with the XStore Swatches Filter widget and WooCommerce wc_layered_nav_counts, particularly with WooCommerce 11.x?

    We would specifically like to know:

    Why these XStore widgets can cause the layered navigation count transients to grow to several MB.
    Whether this is a known compatibility/performance issue.
    Whether there is a fix or patch available.
    Whether there is a recommended XStore filtering method that allows us to filter by Color, Size and Cup Size without generating these extremely large transients.
    Whether the XStore filter widgets are fully compatible with WooCommerce 11.0.1.

    We can provide screenshots showing the transient sizes, SQL execution times, server RAM/CPU usage and the 502 errors if required.

    Thank you.

    Files is visible for topic creator and
    support staff only.
    4 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    September 2, 2026 at 14:24

    Hello, Elgaroe,

    Thank you for contacting our support and for providing such a thorough and detailed breakdown of the issue, along with server specs and SQL query results.

    The standard WooCommerce layered navigation widgets calculate product counts based on attribute combinations and cache these results using transients (_transient_wc_layered_nav_counts_*). On stores with a large catalog, multiple complex attributes (like color, size, cup size), or frequent AJAX filtering requests, WooCommerce generates a vast matrix of permutation transient rows. Over time, this can lead to database bloat in wp_options and high CPU/RAM usage.

    To help us investigate and resolve this for your setup, please try the following steps:

    Clear WooCommerce Transients: Go to WooCommerce > Status > Tools and run Clear WooCommerce transients as well as Clear expired transients.

    Alternative Filtering Options: Consider testing the default XStore Smart Product Filters / AJAX Filters or native WooCommerce Filter by Attribute widgets to check if the transient accumulation persists.

    Staging / Access Verification: If you would like our development team to inspect the issue directly on your site, please ensure that the provided staging or admin access details in the private credentials area are active so we can run tests without affecting your live site.

    Best Regards,
    8Theme’s Team

    Avatar: Elgaroe
    Elgaroe
    Participant
    September 10, 2026 at 19:59

    Hello,

    We have now carried out the tests you suggested, and the results are very significant.

    We cleared both WooCommerce transients and expired transients, and we removed the XStore Swatches Filter widgets for Color, Size and Cup Size from the shop sidebar.

    We then replaced them with the native WooCommerce “Filter Products by Attribute” widgets for the same three attributes.

    After browsing the shop and using the filters, the website remains fast and responsive.

    More importantly, the WooCommerce layered navigation transients are now only approximately:

    pa_color: 0.01 MB
    pa_talla: 0.01 MB
    pa_copa: 0.01 MB

    Previously, when using the XStore Swatches Filter widgets, these same transients grew to approximately:

    pa_color: 4.89 MB
    pa_talla: 4.92 MB
    pa_copa: 8.58 MB

    When they reached those sizes, the website became extremely slow, server RAM usage increased significantly, and we eventually experienced 502 Bad Gateway errors. Deleting those transients immediately restored normal performance.

    Therefore, at this point the issue appears to be specifically related to the use of the XStore Swatches Filter, rather than simply to the WooCommerce attributes themselves.

    We have also checked the configuration of the XStore Swatches Filter. The option “Use AJAX preload for this widget” is disabled, as is “Show product counts”.

    The native WooCommerce filters solve the performance problem, but they introduce another issue for us: Color is displayed as a text/checkbox list instead of visual color swatches.

    We would therefore like your advice on the recommended XStore configuration to achieve:

    Visual color swatches in the shop filter.
    AJAX filtering if appropriate.
    Without causing _transient_wc_layered_nav_counts_* to grow to several MB again.

    You previously suggested testing XStore Smart Product Filters / AJAX Filters. Could you please tell us exactly which XStore widget/filter we should use and how it should be configured for Color, Size and Cup Size?

    If necessary, your development team can investigate why the XStore Swatches Filter causes such a dramatic increase in the layered-navigation cache on this store.

    Thank you

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    September 11, 2026 at 07:06

    Hello, Elgaroe,

    Thank you for providing such detailed test results.

    To achieve visual color swatches without triggering severe transient bloat, we recommend using the XStore Smart Product Filters widget instead of the legacy Swatches Filter widget:

    1. Widget Setup

    Navigate to Appearance > Widgets (or Appearance > Customize > Shop Filters) and add the XStore Smart Product Filters widget to your shop sidebar.

    Add an attribute item for Color (pa_color) and set the Display Type to Color / Image Swatches.

    Add attribute items for Size (pa_talla) and Cup Size (pa_copa) using Dropdown or List format.

    2. Recommended Settings

    AJAX Option: Set filter submission/behavior to AJAX (or standard redirect), but disable “AJAX Preload” to avoid generating background count queries for all variation permutations.

    Product Counts: Keep product counts disabled for these attribute filters, as calculating counts dynamically across multi-attribute products is what forces WooCommerce to build large _transient_wc_layered_nav_counts_* arrays.

    3. Next Steps & Investigation

    Our development team is reviewing the query behavior of the legacy XStore Swatches Filter widget under WooCommerce 11.x to optimize its transient caching strategy in upcoming theme updates.

    In the meantime, testing the XStore Smart Product Filters with the settings above will provide full visual swatch support while keeping transient sizes small (under 0.05 MB). Please let us know how the performance looks once applied!

    Best regards,
    8Theme Support Team

    Avatar: Elgaroe
    Elgaroe
    Participant
    September 11, 2026 at 20:18

    Hello,

    Thank you for the instructions.

    However, we cannot find the “XStore Smart Product Filters” widget you mentioned.

    We have checked Appearance > Widgets > Available Widgets, and the XStore filtering widgets available in our installation are:

    Apply All Filters
    Filter Products by Categories
    Filter Products by Price
    Filter Products by Brands
    Swatches Filter
    Product Status Filters
    Active Product Filters

    There is no widget called “XStore Smart Product Filters” available.

    I am attaching a screenshot of the complete Available Widgets section so you can see exactly what is available in our installation.

    The Swatches Filter is the legacy widget that we have already removed because it causes the _transient_wc_layered_nav_counts_* values to grow dramatically.

    Could you please clarify exactly which widget or XStore feature you are referring to as “XStore Smart Product Filters”?

    If it needs to be enabled somewhere in XStore settings, please provide the exact path to activate it.

    Also, please confirm whether this feature is available in our current XStore version and whether it requires an additional plugin/module.

    We do not want to reactivate the legacy Swatches Filter because the website is currently running smoothly with the native WooCommerce filters and the transients remain around 0.01 MB.

    Thank you.

    Files is visible for topic creator and
    support staff only.
  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.