前提条件 Magento CE 2.2.0 PHP 7.0.23-1
数据库从 1.9.2 迁移到 2.2.0
检查了不同的实例和各种版本。配置了最高可能的服务器配置。
-我们有一个“经典戒指”类别,只有 12 种可配置产品。每个可配置产品至少包含 1100 个简单产品,其中一些具有 1500 多个简单产品,并且在一个“经典环”类别下总共有 13k 多个产品(包括可配置和简单变体)。
一种可配置产品有 5 个属性“颜色、材料、表面处理、厚度、宽度”,我们在列表页面上显示每个产品属性,包括其所有样本选项(如颜色:红色、绿色、黄色..,材料:10k, 14k,18k..,宽度:2mm,4mm to 12mm..等)
重现步骤
当我们点击 classicrings 类别(即前端的列表页面)以在前端显示所有 12 个可配置产品时,服务器将在 10 到 15 分钟后超时或加载页面。
-因此,我们调试了 list.phtml 代码并注释了以下代码,所有样本属性及其选项都通过该代码出现在列表页面上:
//echo $block->getProductDetailsHtml($_product);
After commenting above line of code, listing page start loading quickly within 2 sec. But this is not the solution. As client want to display the all attributes with its options, which is taking too much time to load and going server time out most of the time.
预期结果
类别产品列表页面应加载所有属性和选项,至少需要 2 到 5 秒(包括显示所有属性和选项)。
实际结果
请求超时
此请求处理时间过长,已被服务器超时。如果不应该超时。有时系统崩溃。
对于较小的产品变化,它加载良好,但也需要 40 多秒。