5

I have seen the Index Management of our site via admin panel System->Index Management. While checking, some of the indexes haven't updated. In this case, I'm not sure whether the index is working or not.

Please see the screenshot for better understanding.

enter image description here

Could anyone please guide me on how to check the reindex status?

  • Your mode is "update on save". so save a category and see if its getting updated. Or you can try changing mode to "update by schedule" and setup a cron for the updation. – NID Apr 11 at 5:19
  • The thing is when I save a category, it's updating but in the index management, the indexer update date is not updated to the latest date. – Siva Apr 11 at 5:21
  • 1
    Have you tried running reindex from terminal php bin/magento indexer:reindex – NID Apr 11 at 5:23
3

There are three steps to schedule index cronjobs

  1. In store -> Configuration
  2. Through shell
  3. In crontab.xml

shell crontab will run magento cron for every 1 minute, it will check you Store->Config setting, and after that it will go to the crontab.xml to check cron scheduling.

So if you want to run using update and save, then you will need to schedule cron(Shell) for every 1 minute, and also 1 minute in configuration.

You don't need to worry about crontab.xml because it has the best scheduling in default according to Magento default settings.

Now check in store -> Configuration

Go to

Store -> Configuration -> Advanced -> System

in Cron (Scheduled Tasks) check Cron configuration options for group: index and verify if General Scheduling Every is set to 1

After that, you will need to check cron scheduling on shell crontab -e (for ubuntu).
Cron scheduling should be like this:

* * * * * /usr/bin/php7.1 /PATH_TO_YOUR_MAGENTO/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /PATH_TO_YOUR_MAGENTO/var/log/magent$
* * * * * /usr/bin/php7.1 /PATH_TO_YOUR_MAGENTO/update/cron.php >> /PATH_TO_YOUR_MAGENTO/var/log/update.cron.log
* * * * * /usr/bin/php7.1 /PATH_TO_YOUR_MAGENTO/bin/magento setup:cron:run >> /PATH_TO_YOUR_MAGENTO/var/log/setup.cron.log

Note: Path should be set according to your project

That should fix your issue.

  • Thanks for short and detailed information. I have checked all the points you have mentioned and see that all are set correctly. However, in the admin panel, the date is not updated for some of the indexers at index Management. Yes, that's not big deal after I have known the cron is working fine. But I would like to know why the date is not updated. – Siva Apr 11 at 5:50
  • Thanks for the appreciation. +1 for that :) – Shoaib Munir Apr 11 at 5:53
  • You deserve it :) I have checked and see the Schedule Status isn't showing any error against an index. What does it mean? – Siva Apr 11 at 5:56
  • 1
    Yes, the changes are reflecting on the frontend. So now I concluded that the cron is working fine for our site. Thank you very much for all your information. – Siva Apr 11 at 6:07
  • 1
    Yes, same here. So that it may Magento issue as you said. – Siva Apr 11 at 6:16
6

You can check via command line:

php bin/magento i:status
  • 1
    I have checked the reindex status via command, it shows all the indexes are ready but my question if you see the attached screenshot the date is not updated in the Index Management at admin panel. What could be the reason for that? – Siva Apr 11 at 5:32
  • @Narendra, good approach you provided to check cron status. +1 for that – Shoaib Munir Apr 11 at 5:54
3

Indexers can be managed/updated by two following ways.

  1. Update on Save: This runs every time when ever you are making any changes to the particular field & save it. viz. When a customer is buying a product stock Index is get reindexed, When you are making any changes into the product price product price indexer is get reindexed. It works similarly for other indexers also.
  2. Update By Schedule: It is running based on the cron set in your Magento.

Here in your settings your Indexer update Action Mode is set on Update on Save & since you haven't made any changes from long time into Product Categories & into the Product Price/Cart Price rule So it is not showing any update into it. As of you will create any cart rule or you will make any changes to the product category it will run the relevant indexers & then you can see the updates into that particular indexer.

If you want to run the indexers on the basis of cron schedule change the Action drop-down value to Update By Schedule & click on the submit. You can set these indexers cron from Below location.

  • Go to Admin > STORES > Settings > Configuration.
  • Go to Advanced > System > Cron (Schedule Task)
  • Change the values as per your requirement in Cron configuration options for group: index
  • Save the changes & flush the cache.
3

You have enabled Update on Save, so the reindex will occur in realtime whenever a change is made in the admin. So you might not have done any changes for that indexers product category and catalog rules, so that you are seeing the last updated date(i.e.) reindex has occurred when you made changes to those indexers in December and March.

So if you enable the reindex to Update on Schedule , the reindex will occur through cron job regularly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.