Site loads slowly when config many configurable products on M2.4.0

Created by Rosa Truong, Modified on Tue, 10 Nov, 2020 at 2:49 PM by Rosa Truong

Issue:

Plugin out of memory (4GB) when opening grouped products with more than 15 configurable products.

Vanilla Magento 2.4 No plugins / Default Luma Theme.

The site loads so slowly when going a product link (more than 16 config products).

Could you please check and give the solution?


Solution: 

It only happens on Magento 2.4.0 when one grouped product has a lot of configurable products; so it causes the error Memory size allocated for the temporary table.

The root of this issue is that the site has to caches a huge HTML with js.

To fix this issue, we would like to give a hot-fixe solution when using the cache lifetime to solve the problem.

We have changes this file app/code/Bss/GroupedProductOption/Block/Product/View/Type/Configurable.php 

When getCacheLifeTime is null, instead of loading html from cache, block will render  function _toHtml().

Please check and try to apply the solution and then flush the cache on your site.


If you have any other issues, please don't hesitate to contact us.

We are always willing to support you.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article