-
Notifications
You must be signed in to change notification settings - Fork 9.4k
The table 'catalog_category_product_index_tmp' is full #6415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think the 64M is a respectable amount, but currently contacting my hosting provider to increase the |
Testing locally it was indeed solved by upping the limit to |
If you increase the size on fly and do not restart mysql server, truncate the table manually so it applies the new size for that table. |
I've changed the storage engine to |
Also present in Magento |
In my opinion: try not to have all the logic in 1 mysql query, but try to have some logic in PHP that divides it into multiple queries. This way mysql doesn't blow up ;) |
Same problem with 700K products - have to alter table engine=innodb for that index process to complete. I suspect using MEMORY for the table is not always optimal in large catalog setups and should we really need those _tmp tables to default to type=memory ! It would seem just as slow as using a large mysql memory footprint backed by SSD storage as a better approach! |
[mysqld] in /etc/my.cnf and a restart of mariadb fixed this for me. |
@rip057 In my case 512M wasn't enough, so upping the memory limit wont solve this issue. |
We are experiencing a similar issue with table @PascalBrouwers I agree that indexing in query batches would be a solution. A config added to specify the batch size would be welcomed as it would allow server specific settings for adjusting performances. |
Any news on this.. ? |
@paales, thank you for your report. |
i am still having this problem in magento 2.2.0. |
@magento-engcom-team Can I have the commit reference of this fix ? |
@magento-engcom-team , I can confirm that issue is still present.
Can you please reference the commit, which is responsible for fixing the issue? |
I am facing similar issue while placing order We face this issue after upgradation of magento to 2.1.10 from 2.1.5 |
tmp_table_size = 4G seems to help in my.cnf or remove : $table->setOption('type', 'memory'); from to disable use of memory type tmp tables. I'd do that and recommend using tmpfs for /tmp and setting my.cnf temp to use /tmp if you have enough ram! tmpfs 60350944 176 60350768 1% /tmp |
@magento-engcom-team Please refer the commit for this... |
this isnt necessarily a magento issue. other than the method that they use to go about indexing the various tables for later use. an error of |
@rip057 this IS a magento issue. Or rather a flawed programming design of putting all logic in 1 huge query. You will notice these issues when you have stores with 300k+ products in them with multiple store views. |
That is the nature of database indexes, you do one HUGE calculation now to
stop yourself from doing a certain calculation over and over again. You do
know the reason that DB tables have indexes? For faster searching and
inter table correlation. Each product can have up to as many entities as
are defined, which by default is at least a hundred could be on the order
of hundreds, and when you add a couple of zeros to the end of that 300K
figure... Well it's a really big calculation. I've given you suggestions.
…On Dec 4, 2017 9:17 AM, "PascalBrouwers" ***@***.***> wrote:
@rip057 <https://github.com/rip057> this IS a magento issue. Or rather a
flawed programming design of putting all logic in 1 huge query. You will
notice these issues when you have stores with 300k+ products in them with
multiple store views.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6415 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ0Vctkz-sUlNUwgKodnvtJAfJNw0eWxks5s9Az7gaJpZM4Jxbgm>
.
|
@magento-engcom-team: can you reference the commit(s) which solve this issue in 2.2.x ? We run against this problem on Magento 2.1.12 with a big shop, although it's a different table then referenced above, namely: I can find some commits referencing something related:
Any chance these will fix this issue? And backporting those to 2.1 won't cause new problems? Thanks! |
Had the same error today on Magento 2.2.2. In my case the table was |
We are still facing this issue in Magento 2.2.3 in |
Did you read the thread? You need to increase the max temp table setting in
my.cnf
See
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmp_table_size
…On Wed, Jul 18, 2018, 1:45 AM Rajesh Harwani, ***@***.***> wrote:
We are still facing this issue in Magento 2.2.3 in
catalog_category_product and catalog_product_category reindexing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6415 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ0VciPkzveNZvGv0FLZPU-P6_jzwPuoks5uHtmSgaJpZM4Jxbgm>
.
|
The actual limit is determined from whichever of the values of tmp_table_size and max_heap_table_size is smaller. If an in-memory temporary table exceeds the limit, MySQL automatically converts it to an on-disk temporary table. |
It is also worth noting that if the above doesn't seem to help, to check the innodb_temp_data_file_path: |
I had this issue and upon further investigation it appeared the cause of my error was due to running out of hard disk space on my VPS. I had set up a duplicate site on my server for testing and apparently the last product my client added filled up the disk space. So I had no room On-Disk for mysql to use a temporary table. Just something else to look at. |
I will add this here in-case it helps anyone. I was having this issue not with a full reindex but when reindexing only 536 products from a specific category. When diving into this problem I noticed that the redinexall ends up calling What makes things a bit more confusing is that the full index method claims to take in ids but then ignores them when processing.
You can see the three different methods for reindexing all, multiple ids and a single id at https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Model/Indexer/Product/Eav.php#L53 |
[TR] Gainsight integration + Split DB deprecation
Uh oh!
There was an error while loading. Please reload this page.
Preconditions
tmp_table_size
andmax_heap_table_size
to 64MSteps to reproduce
php bin/magento indexer:reindex catalog_category_product
Expected result
Actual result
The text was updated successfully, but these errors were encountered: