In our case the indexer_update_all_views job is executed every 5 minutes and, in most cases, the execution time is 1 sec - all indexes are valid and don't overload the database. Timeline - visualization of table cron_schedule Note: By default, history will be stored for 3 hours.Ĥ) Keep an eye on the indexer_update_all_views job and indexes in the Index Management section. It will allow you to find out what's going on on the website within 24 hours. Increase History lifetime in Stores > Configuration > Advanced > System > Cron (Scheduled Tasks) by 1440 min = 24 hours. Run full reindex bin/magento ind:reind to make all indexes valid (green).ģ. Install the Cron Manager extension that can help you to monitor your cron jobs.Įxample of an extension for cron managementĢ. To figure that out try one of the following methods.ġ. Since you already know that your indexes get invalidated because of the attribute values changing, you also need to know which values exactly. How to Find What Causes Index Invalidation? It is during such reindex process that the Magento deadlock issue appears. Particular reindex is faster than full reindex but also takes some time and creates an unnecessary overload on DB. If your index mode is Update by Schedule, Magento does a particular reindex (only for indexes that were invalidated) when cron jobs indexer_reindex_all_invalid and indexer_update_all_views are runnings. So, after the script execution, we got 20K invalid indexes.Īs we've mentioned above, a full reindex takes 40 minutes. But data was processed and indexes invalidated - need to avoid such situation. The script will manipulate the data (change all attribute values to 0 then some to 1) and the final result will stay the same. So, the number of new products will, most likely, stay the same for a few hours or even days. If a script runs every hour, then very few attribute values need to be changed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |