Skip to content

Instantly share code, notes, and snippets.

Embed
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="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Catalog\Model\Indexer\Category\Product\Action\Full">
<arguments>
<argument name="batchRowsCount" xsi:type="number">1000</argument>
</arguments>
</type>
<type name="Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\BatchSizeCalculator">
<arguments>
<argument name="batchRowsCount" xsi:type="array">
<item name="configurable" xsi:type="number">500</item>
</argument>
</arguments>
</type>
</config>
@harshvardhanmalpani

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.