Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Fixes batch size for Magento 2.2.4 and above. Put the file in app/code/[Vendor]/[Module]/etc/adminhtml/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Catalog\Model\Indexer\Category\Product\Action\Full">
<argument name="batchRowsCount" xsi:type="number">1000</argument>
<type name="Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\BatchSizeCalculator">
<argument name="batchRowsCount" xsi:type="array">
<item name="configurable" xsi:type="number">500</item>

This comment has been minimized.

Copy link
Owner Author

@harshvardhanmalpani harshvardhanmalpani commented May 20, 2019

This fixes the system.log error

main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 100000; Allocated memory size: 540000000 bytes; InnoDB buffer pool size: 1610612736 bytes. [] []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment