Transients Layered Nav Counts problem (WooCommerce): verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
Regel 15: Regel 15:
  
 
Layered navigation typically appears as a sidebar or series of filters on category pages or search results. When customers select specific criteria or attributes, the displayed products dynamically update to show only items that match the chosen filters. This feature enhances the user experience by making it easier for customers to find the products that meet their specific preferences or requirements.
 
Layered navigation typically appears as a sidebar or series of filters on category pages or search results. When customers select specific criteria or attributes, the displayed products dynamically update to show only items that match the chosen filters. This feature enhances the user experience by making it easier for customers to find the products that meet their specific preferences or requirements.
 +
 +
== Layered navigation counts ==
  
 
== Transients ==
 
== Transients ==

Versie van 6 dec 2023 15:26

The problem

We have the problem described here:

  • A couple of transients with names starting with transient_wc_layered_nav_counts_pa_ that make up about 80% of the site of table wp_options
  • Storage space for table wp_options grows with about 2GB per minute, probably because of logging, as these transients are updated constantly
  • Db crashes when running out of storage space
  • Site performance degredation, even with enough storage space available
  • Every couple of days, we have to delete transients - We have been doing this for at least a year already and only now can I connect it with the other issues
  • File /var/log/php/error.log grows as well with about 2GB/minute. Unknown if this is related

Layered navigation

In WooCommerce, layered navigation refers to a filtering system that helps customers refine their search results while browsing a store. It allows shoppers to narrow down product selections based on various attributes or criteria, such as price range, size, color, brand, or any custom product attributes set by the store owner.

Layered navigation typically appears as a sidebar or series of filters on category pages or search results. When customers select specific criteria or attributes, the displayed products dynamically update to show only items that match the chosen filters. This feature enhances the user experience by making it easier for customers to find the products that meet their specific preferences or requirements.

Layered navigation counts

Transients

Example:

option_id                    option_name                     First characters       Size
---------   -----------------------------------------   -------------------------   -----
2168239     _transient_wc_layered_nav_counts_pa_asxxx   a:16:{i:0;b:0;s:32:"c5662   0.28M
2168225     _transient_wc_layered_nav_counts_pa_auxxx   a:16:{i:0;b:0;s:32:"4c798   0.60M
2168229     _transient_wc_layered_nav_counts_pa_coxxx   a:16:{i:0;b:0;s:32:"c3e8d   0.35M
2168221     _transient_wc_layered_nav_counts_pa_depxx   a:16:{i:0;b:0;s:32:"56496   0.36M
2168213     _transient_wc_layered_nav_counts_pa_devxx   a:16:{i:0;b:0;s:32:"4c23e   0.34M
2168235     _transient_wc_layered_nav_counts_pa_dixxx   a:16:{i:0;b:0;s:32:"258a3   0.39M
2168223     _transient_wc_layered_nav_counts_pa_lexxx   a:16:{i:0;b:0;s:32:"099f4   0.37M
2168215     _transient_wc_layered_nav_counts_pa_moxxx   a:16:{i:0;b:0;s:32:"cc751   0.38M
2168233     _transient_wc_layered_nav_counts_pa_orxxx   a:18:{i:0;b:0;s:32:"65b34  10.28M
2168237     _transient_wc_layered_nav_counts_pa_prxxx   a:16:{i:0;b:0;s:32:"4ae79   1.86M
2168231     _transient_wc_layered_nav_counts_pa_sprxx   a:16:{i:0;b:0;s:32:"c5e23   0.36M
2168217     _transient_wc_layered_nav_counts_pa_subxx   a:16:{i:0;b:0;s:32:"52a9d   0.34M
2168219     _transient_wc_layered_nav_counts_pa_widxx   a:16:{i:0;b:0;s:32:"7735d  14.90M
2168227     _transient_wc_layered_nav_counts_pa_wirxx   a:16:{i:0;b:0;s:32:"a04c7   0.34M

See also

Sources