Skip to content

Warning Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size

I am using Magento 2.4.5 and getting 5 warning logs in system.log file while I run the command

php bin/magento indexer:reindex

Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size.

So far I have done the below steps

1.

Increased the value of variable innodb_buffer_pool_size to 1G inside
        /etc/my.cnf and restarted MySQL.
  1. I have added the code in my app/etc/env.php file
'indexer' => [
        'batch_size' => [
            'cataloginventory_stock' => [
                'simple' => 200
            ],
            'catalog_category_product' => 666,
            'catalogsearch_fulltext' => [
                'partial_reindex' => 100,
                'mysql_get' => 500,
                'elastic_save' => 500
            ],
            'catalog_product_price' => [
                'simple' => 200,
                'default' => 500,
                'configurable' => 666
            ],
            'catalogpermissions_category' => 999,
            'inventory' => [
                'simple' => 210,
                'default' => 510,
                'configurable' => 616
            ]
        ]
    ]

Now the number of logs decreased to 1

I have added the below code in my custom module /etc/adminhtml/di.xml file

<type name="MagentoCatalogModelIndexerCategoryProductActionFull">
        <arguments>
            <argument name="batchRowsCount" xsi:type="number">1000</argument>
        </arguments>
    </type>
    <type name="MagentoCatalogModelResourceModelProductIndexerPriceBatchSizeCalculator">
        <arguments>
            <argument name="batchRowsCount" xsi:type="array">
                <item name="configurable" xsi:type="number">500</item>
            </argument>
        </arguments>
    </type>

Still, there is one warning message log, how to resolve this?