5

Base table or view not found: 1146 Table 'catalog_category_flat_store_1' doesn't exist

I have see some answer for this question but its quick fix after some time I have same issue. But I get this error frequently. We can't say customer always to try again or refresh page. If I refresh page or do re-index I can see table available.

As part of debug I tried to DROP table manually and then visit pages but I can't see any error but I found that when table is not exits Magento will disable Flat table option in admin. so here I am not sure when this error occurs and what is the best solution to get rid of this.

If anybody found any solution to get rid of this problem permanently?
For your information I have repair database as well as I replace flat table with fresh Magento table but still no luck I get error again after 2 days.

9
  • what is the compilation status of your store?? is it enable or disable?
    – Asish Hira
    Apr 22, 2016 at 9:51
  • Thanks @AsishHira. No compilation is not enable in my store.
    – Kul
    Apr 22, 2016 at 10:27
  • i guess you have some database issues, and reindex will crash or delete this table. you need to find out any mysql errors
    – MagenX
    Dec 21, 2016 at 14:22
  • Do you have an extension (poorly build one) that reads values directly from that table?
    – Marius
    Dec 21, 2016 at 14:31
  • @Marius There was module before for dynamic category but Now I have made script and using query i update data for categories by cron and we used magmi for import product from erp system.
    – Kul
    Dec 21, 2016 at 14:43

1 Answer 1

3
+25

If you are running a store with a very small number of products/categories you may want to simply disable the flat tables in System > Settings > Catalog. This can also sometimes be the case for very large catalogs as there is an obvious trade off to flattening the EAV tables. 1) It's less indexing that has to happen. 2) It can sometimes be faster if certain scenarios mentioned above are the case.

How are you normally re-indexing via the CLI? Do you receive any Exception or error messages when running it from the command line? php -f shell/indexer.php reindexall ?

You should also take a look in var/log/exception.log & var/log/system.log to see if there is any insight into the indexing failing. As what may be occurring is when your integration cron runs for Magmi, a reindex could be triggered that is failing, a normal operation for the *_flat tables is to drop the table before rebuilding it, it's a temporary table as you mentioned dropping the table manually works briefly. With this in mind, the indexer may start, hit an issue causing the indexer to fail and leaving the _flat table missing until a manual reindex happens. More details on your store's setup, integrations and reviewing logs to help pinpoint WHEN it happens may help with the process of elimination to locate the issue and fix it. Disabling your Magmi integration briefly may be something to consider as well to determine if the table still is missing or not. Anyhow, hope this helps and here's some further reading on the flat table/indexing:

Resources:

4
  • No i have not any error while running indexing from CLI using this command php -f shell/indexer.php reindexall
    – Kul
    Dec 27, 2016 at 14:25
  • There is not log but i can see error report on var/report folder
    – Kul
    Dec 27, 2016 at 14:29
  • Whats the contents of some of the files in var/report they are just text files so you can view them easily to see exceptions.
    – B00MER
    Dec 28, 2016 at 20:10
  • This is a good suggestion +1: How are you normally re-indexing via the CLI? Do you receive any Exception or error messages when running it from the command line? php -f shell/indexer.php reindexall I found errors this way.
    – Akif
    Jan 16, 2018 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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