Home / Forums / WoodMart support forum / “Variation as product” causes memory exhausted crash
Home › Forums › WoodMart support forum › “Variation as product” causes memory exhausted crash
“Variation as product” causes memory exhausted crash
- This topic has 10 replies, 2 voices, and was last updated 2 months, 2 weeks ago by
Artem Temos.
-
AuthorPosts
-
April 12, 2026 at 8:29 pm #715792
jeremb5ParticipantEnvironment:
- Woodmart 8.4 (latest)
- WordPress + WooCommerce + Elementor Pro (latest)
- Hosting: Kinsta (WP_MEMORY_LIMIT: 256MB, PHP memory_limit: unlimited)
- Catalog: ~20 products, ~10 variations total
The problem:
<p>
When “Show single variation” = YES and “Hide variations parent” = YES, the site crashes with:
</p>PHP Fatal error: Allowed memory size exhausted in class-wpdb.php line 2357<p>
This happens when applying multiple layered navigation filters on shop/category pages.
</p>- Crash occurs with 3–4 filters on main categories
- Crash occurs with only 2 filters on subcategories
<p>
This happens even with 512MB WP_MEMORY_LIMIT and when the query returns only 1–2 products.
</p><p>
Database is very small:
</p>- 783 posts
- 6128 postmeta
- 1132 term_relationships
<p>
We tested on another Woodmart site (50x more products, same stack, “Variation as product” OFF) → no issue at all.
</p><p>
Disabling “Variation as product” immediately resolves the problem.
</p>How to reproduce:
- Enable:
- “Show single variation” = YES
- “Hide variations parent” = YES
- Go to a category page
- Apply multiple filters (example: color + extensible + wheels + fabrication, with query_type=or)
- Result → Fatal error (memory exhausted)
<p>
On subcategories (e.g. /samsonite/upscape/), the crash occurs with only 2 filters.
</p>Root cause (confirmed via SSH debugging):
- Each filter adds a LEFT JOIN on
wp_term_relationships - Multiple filters = multiple JOINs on the same table
- The module
show-single-variations/class-query.phpadds ~5 subqueries per request:- Dependent subquery on wp_posts
- Multiple NOT IN (wp_postmeta)
- NOT IN (wp_term_relationships)
- Additional UNION on lookup table
Result → very complex SQL query despite tiny dataset
mysqli_query always tries to allocate ~14.5MB regardless of result count
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 14596719 bytes) in class-wpdb.php on line 2357
- EXPLAIN shows only ~26 rows scanned
- The query returns only 1–2 products
- The issue is not data volume, but query structure
What we need from you:
- Is this a known issue with “Variation as product”?
- Is there a fix or patch available?
- If not, is there a way to disable this logic only on filtered pages (URL containing ?filter_)?
Temporary workarounds:
- WP_MEMORY_LIMIT increased (40M → 256M)
- Bots blocked on filter URLs (robots.txt + mu-plugin returning 503)
- Filters set to OR only (AND makes it worse)
<p>
Current state:
</p>- Stable with 1–3 filters
- Crash at 4 filters (or 2 on subcategories)
<p>Thank you</p>
April 13, 2026 at 9:09 am #715817Hello,
Could you please temporarily disable all plugins that are not related to our theme (including caching, optimization, and third-party WooCommerce extensions)? This will help us check if any of them are causing the issue.
After that, kindly share your WordPress admin access using the Private content field so we can investigate it directly.
We will review your setup and get back to you shortly.
Best regards
April 14, 2026 at 6:56 pm #715974
jeremb5ParticipantHello,
OK done.
Thanks youApril 15, 2026 at 9:16 am #716001As we can see, some extra plugins are still enabled. Please turn them all off so we can test with theme-related plugins only.
April 15, 2026 at 7:01 pm #716054
jeremb5ParticipantYou have our authorization to deactivate it during your test
April 15, 2026 at 7:03 pm #716055
jeremb5ParticipantWe were able to replicate the issue with all non-theme-related plugins deactivated. The only exception is WPCode Lite, which we can’t deactivate without impacting the user experience. Of course, we kept Elementor/Elementor Pro active since they’re supposed to work with Woodmart
-
This reply was modified 2 months, 2 weeks ago by
jeremb5.
April 16, 2026 at 9:23 am #716084Hello,
WPCode Lite should also be deactivated temporarily since it may affect this. Please let me know if we can do this for the test.
Kind Regards
April 17, 2026 at 7:04 pm #716252
jeremb5Participantyes i confirm thanks
April 20, 2026 at 10:03 am #716378Hello,
Could you please also provide us with your FTP access so we can check it further?
Kind Regards
April 20, 2026 at 11:02 am #716394
jeremb5ParticipantHello,
Creds have been addedApril 20, 2026 at 1:03 pm #716419Hello,
To fix this issue, you need to clear transients in WooCommerce as shown on the screenshot https://monosnap.ai/file/R1dPqkaVRczyN9GIqkZe8tX5nVB71z
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register