Product categories and Catalog product rule indexes are not running on a scheduled cron. Is this normal?
There are couple of things you can check.
- Check if after changing those indexer into
Update by schedulemode you can see tables
catalog_product_category_cl. If not you need to debug why changing mode is not creating them.
- Check if triggers that should fill these tables are created with commands in the database:
show triggers where statement like "%catalog_category_product_cl%";and
show triggers where statement like "%catalog_product_category_cl%";. When I checked 2.2.6 clean version I see 6 and 9 triggers respectively.
- Do some changes by editing the category or product and see if
%_cltables are updated with ids of the changed entity
- Check table
cron_schedulefor entries with
indexer_update_all_views. See if the result is success or error and if they were actually run.
- If enabling only them or only 1 of them is working but not with others that could mean some other indexer is causing an error and the processor is not reaching this particular indexer.
- If you see
Reindex Requiredstatus that means some module marked this indexer as invalid but the
%_cltables are probably not updated. This status should be updated by cron
cron_scheduletable if you see it fired and executed without errors.
You need to change the indexer mode to update on schedule by running the below command
php bin/magento indexer:set-mode schedule
You can check the mode by running the below command
php bin/magento indexer:show-mode
You can change the mode to update on save by running the below command
php bin/magento indexer:set-mode save
Refer this link for breief explanation regarding indexer command