16

After I've upgraded my Magento to EE 1.14.2.0 the cron enterprise_refresh_index always gets this error:

exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'catalog_product_entity_tmp_indexer' doesn't exist' in /var/www/public_html/lib/Zend/Db/Statement/Pdo.php:228

I don't get why this table doesn't exist. Shouldn't Magento create it in the process of the refresh index?

7ochem
  • 7,532
  • 14
  • 51
  • 80
Joke Puts
  • 341
  • 2
  • 6

5 Answers5

5

There's a Magento patch SUPEE-5984, which addresses these kind of Enterprise Refresh Index problems.

5

We encountered this error after a database restart in production and after a first reindex on a local development environment, running EE 1.14.2.3.

What worked for us was the following:

  1. Disable the flat product catalog
  2. Observe that the indexer runs successfully
  3. Enable the flat product catalog
  4. Observe that the indexer runs successfully
Aad Mathijssen
  • 1,901
  • 1
  • 16
  • 24
4

For future reference: The error doesn't occur when I revert the file app/code/core/Enterprise/Catalog/Model/Index/Action/Product/Flat/Refresh.php to our previous version 1.14.0.1.
The new parameter $resetFlag in the function _reindex seems to cause the problem.

scrowler
  • 2,014
  • 1
  • 18
  • 42
Joke Puts
  • 341
  • 2
  • 6
  • "Awesome", just ran into the same issue. Will try if that solves also our problem. – Anna Völkl Aug 10 '15 at 15:13
  • I can confirm that reverting the file solves the error. Did an update from 1.14.0.1 to 1.14.2.0 and just created a patch file with the modified content of Refresh.php. Next: contacting EE support. – Anna Völkl Aug 10 '15 at 15:38
  • @AnnaVölkl did they provide you any update on this? – Sergei Guk Aug 18 '15 at 14:26
  • 2
    @Sergei Guk: So far I did only reset the file and did not ask for official support or patch. An Update to 1.14.2.1 (maybe solved there?) is in the queue. Need to investigate further when there is time to. – Anna Völkl Aug 18 '15 at 14:28
  • 1
    An update to 1.14.2.1 does not fix this. The Magento support has a patch for it but I still have to test it. – Joke Puts Aug 19 '15 at 19:51
  • The patch worked for me running 1.14.2.0 and .1 - SUPEE 5984 – scrowler Sep 15 '15 at 10:43
  • I seem to have this exact same problem after upgrade from 1.14.0.1 to 1.14.2.1. Have requested the patch from Magento support as well as advice on optimal setup when running the indexer via scheduled events – Shaughn Oct 14 '15 at 11:18
  • Looks like SUPEE 5984 patch worked, however ran into another problem where the indexer would throw a fatal error "Allowed memory size of xxx bytes exhausted". Backtraced the issue down to a Enterprise_Mview query which was returning 25 million records in an array and as a result, ran out of memory. I think its because the above issue has been an issue for so long that the version_id never updated and the changelog just built up each day due to the fatal error. What we did to resolve this now was truncate the table then let the cron / indexer run its natural course. The indexer is now running – Shaughn Oct 14 '15 at 16:27
  • I just had a look for SUPEE 5984 (I have Enterprise login) but I could not find that patch. Where is it? – Henry's Cat Oct 22 '15 at 16:22
4

I can't comment yet on the existing comments/answers, but I can confirm that SUPEE-5984 appears to resolve the issue, at least for our client who encountered this issue (they have over a million products, so it still hasn't finished running, but it IS running now... ). We opened a ticket with Magento through our client's support contract with them and Magento got us the patch in less than an hour.

jvaughn
  • 41
  • 2
1

I had the same problem with Magento EE 1.14.2.3, but the above solutions didn't work for me. I found out the problem was in Enterprise_Catalog_Helper_Product::getFlatColumns. I solved it by changing the line

if ($columns !== null) {

to

if ($columns !== null && $columns !== false) {

Of course: don't edit the core file directly, but do a rewrite.

Tim Bezhashvyly
  • 11,575
  • 6
  • 43
  • 73
Andreas von Studnitz
  • 3,679
  • 24
  • 50