Home Codingmagento catalog_product index does not exist yet. Make sure everything is reindexed.

catalog_product index does not exist yet. Make sure everything is reindexed.

by Ben

For some reason, the catalog_product index could not be indexed through the magento scheduler but you are able to reindex it manually and this causes error in loading the product detail page.

This issue has been occurring ever since I upgraded to Magento 2.4.6 and using Smile Elastic Plugin.

{main} {"exception":"[object] (LogicException(code: 0): catalog_product index does not exist yet. Make sure everything is reindexed. at /vendor/smile/elasticsuite/src/module-elasticsuite-core/Index/IndexOperation.php:118)"} []
[2023-07-27T03:33:09.723085+00:00] main.CRITICAL: LogicException: catalog_product index does not exist yet. Make sure everything is reindexed.

The quick workaround is to manually reindex through the CLI which temporarily solve the issue.

bin/magento indexer:reindex

However, for my case, the issue will come back again after a few hours.

Below are what I did to resolve the issue. Not sure if it helps but I will keep monitor

1. Reset the Index

bin/magento indexer:reset

2. Set Cron job to run every 5 minutes instead of every minute

In your Magento Cron job, update to every 5 minutes

*/5 * * * *

3. Set Magento to Update on Schedule instead of Update on Save

  1. In Magento Admin screen, navigate System -> Index Management
  2. Select all indexers
  3. Click on Action dropdown and select Update by Schedule

4. Truncate cron_schedule table

Truncate the cron_schedule table

TRUNCATE TABLE `cron_schedule`

5. Set Schedule Ahead to 1 min

  1. In Magento Admin screen, navigate Stores->Configuration
  2. Advanced -> System
  3. For all the cron configuration options, set “Schedule Ahead for” = 1 (min)

You may also like

Leave a Comment