magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

cron job Re-indexing takes 1 hour and gets stuck mostly

Open adityag186 opened this issue 9 years ago • 5 comments

Preconditions

  1. 2CPU Cores, CentOS, 5GB RAM, 60GB SSD on siteground cloud server
  2. Magento CE 2.1.3
  3. 350000 products,5GB database size

Steps to reproduce

  1. Cron job runs re-indexer at night when there is no traffic 99% of the times

Expected result

  1. Indexing should happens in 10 minutes at the most I guess

Actual result

  1. Indexers get stuck at processing. Catalog search gets stuck.
  2. Website does not show products for that time
  3. Manual re-indexing needs to be done everytime it happens

adityag186 avatar Dec 26 '16 18:12 adityag186

Tracking the issue for FullText indexer as MAGETWO-56356 - we're planning on addressing near term.

choukalos avatar Jan 05 '17 18:01 choukalos

In the short term please adjust your MySQL configuration - tmp_table_size variable so indexer continues.

choukalos avatar Feb 21 '17 16:02 choukalos

Hi,

Can you please tell me steps on how to do that?

adityag186 avatar Feb 21 '17 18:02 adityag186

@adityag186 You have to set MySQL global system variable https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_tmp_table_size which default value is 16MB, If an in-memory temporary table exceeds the limit, MySQL automatically converts it to an on-disk MyISAM table, so the re-indexation process stucks.

you can read how to do it in this article https://dev.mysql.com/doc/refman/5.7/en/using-system-variables.html

maghamed avatar Feb 21 '17 22:02 maghamed

@adityag186, thank you for your report. The issue is already fixed in develop branch, 2.2.0, 2.1.9

magento-engcom-team avatar Oct 25 '17 12:10 magento-engcom-team