0

I have an issue with my Magento's database (Magento 1): in few days, doing several times the reindexing process, the table 'core_url_rewrite' weighs about 10 GB and the server stops to work. Then, both the frontend and the backend become unable to be reached.

How can I solve it?

Nikunj Vadariya
  • 4,037
  • 1
  • 20
  • 30
stsnow
  • 219
  • 2
  • 13

1 Answers1

0

Solution:

app/code/core/Mage/Catalog/Model/Url.php

around line 807

Mage_Catalog_Model_Url::getProductRequestPath() ]

From:

if ($product->getUrlKey() == '' && !empty($requestPath)
   && strpos($existingRequestPath, $requestPath) === 0
) 

To:

if (!empty($requestPath)
           && strpos($existingRequestPath, $requestPath) === 0
) 

Step 1: Truncate

Truncate the core_url_rewrite table

Step 2: Reindex & Flush Caches

Initiate the re-indexing process on Core URL Rewrites. Thereafter, you'll want to flush the Magento cache & storage cache.

SystemCache ManagementFlush Magento Cache

SystemCache ManagementFlush Cache Storage

You'll notice if you re-run the indexer, the table should stay constant in size (unless you've added more products inbetween or if you have duplicate category names).

Reference

Nikunj Vadariya
  • 4,037
  • 1
  • 20
  • 30