Skip to content

Product price reindex takes too long with Magento 2.4.1 + MySQL 8.x + PHP 7.4 + nginx #31219

@davidandersson1

Description

@davidandersson1

Hello,

We are facing issue on catalog_product_price reindex. reindex takes too long to complete or never completes.

Preconditions (*)

  1. Magento version 2.4.0 or 2.4.1
  2. MySQL version 8.x
  3. PHP version 7.4
  4. Total number of products = 400k (400000)
  5. Total number of bundle products = 1000

Steps to reproduce (*)

  1. Create 1000 bundled products with 15 options.
  2. Create 1 bundled product with 30 options.
  3. Set price_type equal to Dynamic, sku_type equal to Fixed, weight_type equal to Fixed on all bundle products.
  4. Run price reindex from CLI: bin/magento indexer:reindex catalog_product_price

Expected result (*)

  1. Product price reindex takes 1+ hours or more to complete.

Actual result (*)

  1. Product price reindex takes a short time (2-3 minutes) to complete.

If we disable bundle products and perform price index then it completed within only 3 minutes but with enabled bundle products, it will take around 1+ hr.

We also tried to set higher values on some MySQL variables (i.e tmp_table_size,max_heap_table_size,innodb_buffer_pool_size) as per standard guideline as per below link but its not help us.
https://devdocs.magento.com/guides/v2.4/install-gde/prereq/mysql.html

We also done some more investigation for this issue and found one Insert query (attached screenshot) which is taking too long while price reindex running.
Screenshot from 2020-12-09 14-10-46

Look like same issue as per below patch but here we have magento community edition + 2.4 versions
https://support.magento.com/hc/en-us/articles/360051183691-MDVA-31224-Magento-patch-Product-price-reindex-takes-too-long

Please note: Above same configuration + if we use MySQL 5.7 then price index working fine without any extra time and completed within only 5 mins.

Metadata

Metadata

Assignees

Labels

Issue: needs updateAdditional information is require, waiting for response

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions