-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Hello,
We are facing issue on catalog_product_price reindex. reindex takes too long to complete or never completes.
Preconditions (*)
- Magento version 2.4.0 or 2.4.1
- MySQL version 8.x
- PHP version 7.4
- Total number of products = 400k (400000)
- Total number of bundle products = 1000
Steps to reproduce (*)
- Create 1000 bundled products with 15 options.
- Create 1 bundled product with 30 options.
- Set price_type equal to Dynamic, sku_type equal to Fixed, weight_type equal to Fixed on all bundle products.
- Run price reindex from CLI: bin/magento indexer:reindex catalog_product_price
Expected result (*)
- Product price reindex takes 1+ hours or more to complete.
Actual result (*)
- 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.

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.