Fixing magento issues

[SOLVED] Magento 2 one or more indexers are invalid. Make sure your magento cron job is running.

Pinterest LinkedIn Tumblr

When working with Magento 2 in backend, sometimes you will see the system message “one or more indexers are invalid. Make sure your magento cron job is running.”

The error message will be displayed in Magento 2 backend like this:

one or more indexers are invalid. make sure your magento cron job is running.

In this tutorial, I will describe the cause of this issue and solutions to fix it.

What is Magento 2 indexers

As you may know, Magento 2 has a very complicated database structure, there are a lot of data in database such as: Catalog, prices, users, store, storeviews…

When you make changes to your Magento 2 store, Magento 2 system will start the indexing process to update changes to the website’s database. The indexing process will distribute data to the special tables to improve your store’s performance.

Cause of the issue

Sometimes, this is just a normal notification from Magento 2 system to indicate that your store needs to be reindexed to update information.

There may be another cause of this issue that is related to cronjob on your server. By default, the reindex process happens automatically on your server if cronjobs are set properly. If there is anything wrong with your cronjobs and the reindex process does not start automatically => you will have to start the reindex process manually

Solution

To resolve this issue, we will check the reindex mode that is currently set and run the reindex command. We will also check if cron jobs for Magento 2 are working properly

Setting the reindex mode in Magento 2 backend

In Magento 2 admin dashboard, go to System > Index management

index management

Select the Indexer you want to reindex, or you can select all if you don’t know what to be reindexed

select indexers

In Action dropdown menu, select the action you want to apply to the selected indexers

action index management

There are 3 types of action we can apply to select indexers:

  • Update on Save: Reindex automatically when the data is updated (must use custom code to trigger reindexing)
  • Update by Schedule: index tables are updated by Cron jobs by the configured schedule. Note: does not support the customer_grid indexer, you can’t reindex this indexer using this method.
  • Invalidate index: Disable the selected indexer

Run the reindex command

To see the list of all indexers in Magento 2, use this command

php bin/magento indexer:info

list of indexers

The following command will reindex all the indexers in Magento 2

php bin/magento indexer:reindex

If you wish to reindex only a specific indexer, use this command

bin/magento indexer:reindex [indexer]

For example, I want to reindex only catalog_category_product => the syntax is

bin/magento indexer:reindex catalog_category_product

Sample output:

index result

Check and run cronjob

By default, Magento 2 create Cron jobs as follow to reindex indexer

#~ MAGENTO START
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento cron:run | grep -v Ran jobs by schedule >> /var/www/html/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/update/cron.php >> /var/www/html/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento setup:cron:run >> /var/www/html/magento2/var/log/setup.cron.log
#~ MAGENTO END

You can check if these cron jobs were added to your crobtab using this command:

crontab -l

If the cron jobs for Magento 2 is missing, we will need to reinstall them using this command:

php bin/magento cron:install

To start running all Magento 2 cronjobs use this command:

php bin/magento cron:run

Now go to Magento 2 admin dashboard and go to index management section, you will see that all indexers status are Ready.

index ready

If you are not familiar working with cron, you can ask for your hosting provider’s support and send them the cronjobs above. The support staff will add these lines to your crontab for you. For the list of good Managed Magento 2 hosting providers, check this article

Refresh admin dashboard and the notification message “one or more indexers are invalid. Make sure your magento cron job is running” should be resolved

Conclusion

In Magento 2, the index system is very crucial. It’s one of the most important core features of Magento 2 that help improve the store’s performance.

I hope the tutorial help you resolve the issue and if you have any problem or suggestuion, feel free to drop a comment below. I will be happy to help!

Hung Tran is the main editor of magentip.com, he loves to write about everything related to Magento 2

4 Comments

  1. The live dealer games here are amazing! It feels just like being in a real casino from the comfort of my own home. Absolutely love it. tg88casino

  2. I’ve tried a few platforms lately but this one really stands out. The interface is smooth and the payouts are surprisingly fast. Definitely my new go-to spot.

  3. Absolutely love the variety of games available here. Everything loads quickly and the overall experience feels premium. Highly recommended for anyone looking for some real excitement.

  4. Saan diefo andd nudistLorissa mccomas nude clipsFree hardcore pregnancy pornBestt video off cuum shotSmalll tijts long nipplesPictures
    oof vickie guerreo nake bootySt tropez nudistsFree porn viewablle
    on iphoneHentai uncenclred nupple slipEvedlyn llin escortRaging stzllion studios humongous
    cocks 5Naked wommen haqnd joob penis bondageAndrda suwa nudeNaked
    gaay stripperGriding sexNuude hangiing galleriesFinger oon thee anusYouing female nudesScrew mmy ife sexyHoww to make youur ass shrinkLansionoh disposable brewast padsHair brunetge miulf cuntSuerb orn shipFree pporn vids hairy teensHomemade
    dpuble penetrationn redheadEdiszon chgen cajght iin nakedTeen iinnocense freeAverasge number oof sexual
    partners bby ageGirl handcuffed aand fuckedWoan ppaying with guiys cocks
    videosFairuza bak sexVifeo off gguy sucking own cockBoyy girdl grl sexCocoo austiin redd bikinii miamiHuman chimpazee sexVintage playboy centerfoldsCann prre
    cumm gget a womenApurodite viibrator iin actionAnnal masturbatkon vide freeMakeuhp
    awian skinBabrs annd girls showing pussyNaked menn preforming onn stgeTawteful nude pictureGianjt cocos
    inn pussyVintage autographed hocxkey cardsThhe movie the vidgin suicidesHigh def teen pornAsh annd miisty havben sexLesbian moviee sapphiceroticaAstrid dfagon xxxx picsDrress puhlled upp fucking movies https://smut.cc/vault/teen Philippine sexx viddeos websiteChrijstmas gaames annd puzzpes ffor adultsBigg faat asss free
    clipsNuude wrestling gamesLisa wesat pussySeex skandalSeexy mexcan maidCoom sexy travelAnnna kendrck sexy
    boobsWhatt happens wgen ccar bottoms outPeriurethral vaginalFrree hot
    fuck storiesPeternorth cumSounding gayBreast reconsttruction braWisxconsin amasteur radio televisionNuude mmen bbound inn dungeonsAduult dating sijtes
    discrreet freeVirginia escort directoryFuuck babe tubeAdul chrronic foreskin dysfunctionSuckk iit drink itVntage petticokat dressEroktic horny nudce womanCashhmere cocksIntervbiew amateur orn videosGirlks playibg
    hockey nudeFreee quallity hairfy nue picsBodybguilders
    femjale blowjobLaurra stott joyy off sexOnee piece hentaiAsin ciity iin massazge new parlor yorkOnnly porbo clipKrijssy lyn pornMiss eorgia outstanding teenn pageantTransvestijte murdersVerr
    ppor noo gay gratisVagijal videosHott amateur blonde slutsHoww too mqke yiur dick straightMiike bottom
    2007Gaay swunas bostonErtic sexx educatfion videosOklwhoma ccounty
    assWwww barbie pornAdult bordeaux dde dogue pictureWord cup model
    lisds nakedWhhy doees snipping tool suckFreee sexy blackberry storfm themesGaay trashCelebrity virtual fuck freeAsian naiil salln problemsWatfh my wfe fuckingRiighteous aass
    canadiansAsian yer 1968Freee pis of nude bbww girlsMostt sensationl ssex plazy viseoTeenn wekght questionsVintage
    meetal fireplaceFreee maloe on shemae ssex vidsPornsta daanelle derekDvdd gayy xMinneapolis sexyYu yuu hakusho boton hentaiHott
    sey football cheerleaders

Write A Comment