Magento 2 Reindex Issue – MySQL Configuration Guide

databasemagento2reindex

Magento2 Enterprise
After we loaded in about half of our catalog, we started getting this error on re-index:

SQLSTATE[HY000]: General error: 1114 The table
'catalog_category_product_index_tmp' is full, query was: INSERT INTO
catalog_category_product_index_tmp

we have

innodb_version..... 5.7.12 
innodb_data_file_path..... ibdata1:10M:autoextend 
tmp_table_size..... 2097152000 
max_tmp_tables..... 32

Our catalog size is sitting around 300k skus right now and we need to get it to about 1mill.

Best Answer

The question is vague as it is about a configuration issue and for these the exact reason needs to be known which (often) requires insight into the concrete system. So bare with me as an answer can only be limited.

I personally could handle the error message by raising the default (no value configured, it was 16M effectively) to tmp_table_size = 64M / max_heap_table_size = 64M and it solved that problem.

That was Magento EE 2.1.0.

A co-worker had this problem as well, but raising to 64M, 128M, 256M, 512M etc. up to 2G did not solve the problem. Just saying. The only way the problem could be solved while re-indexing was to load a (new/other/different) db-dump which did not cause that issue. Would be interesting to learn what could cause this error as well. As it was a development version, we invested no further research on the issue then.