• Magento

    Refreshing, Clearing, Rebuilding Cache in Magento

    Refreshing, Clearing, Rebuilding Cache in Magento

    Posted on January 30th, 2009

    Written by CJ

    Tags

    About Magento Cache

    This article targets the Magento Cache Management features. It aims to help web developers troubleshoot catalog rewrites, layered navigation indices, and rebuilding search index problems. These problems may or may not be the fault of a bug in Magento, therefore I have put together a checklist to help narrow down a solution, before reporting a bug.

    This troubleshoot article, assumes you have direct access to your Magento files, either local or remote.

    Problems

    Magento stalls forever; when I Refresh Catalog Rewrites, Refresh Layered Navigation Indices; or when I Rebuild Search Index.

    Magento redirects me to home page; when I Refresh Catalog Rewrites; Refresh Layered Navigation Indices, or when I Rebuild Search Index.

    Nothing happens, when I Refresh Catalog Rewrites; Refresh Layered Navigation Indices, or when I Rebuild Search Index.

    Overview Magento Version:
    • 1.2.x and Similar
    System:
    • Ubuntu Server (Linux)
    Difficulty:
    • Moderate
    Modification:
    • No Magento Mods
    Note:
    • Might require you to edit php config file and Magento file permissions.


    Solution

    The cache management scripts are not able to start or finish the task, below is a checklist containing possible fixes so that the scripts can do the job.

    Checklist

    777 your magento_install/app/etc/use_cache.ser

    Edit your php.ini file to allow longer execution time;

    max_execution_time = 18000

    Make sure your attributes with multiple select, drop downs, and yes/no are not searchable (a.k.a quick search).

    The only ones which should be searchable (a.k.a quick search) are text area and text field.

    Make sure all your products have the required attributes filled in. In some cases you might of changed the attribute to required, so you have to go back to your products and fill it in.

    Make sure your configurable products do not require a “Unique Value” in Attribute Properties

    Other Helpful Tasks

    If you’ve made changes to your ‘Attribute Properties’ in Catalog> Manage Attributes> Your Custom Attribute, make sure all the products correctly reflect the new ‘Attribute Properties’.

    Manually delete all cache stored in magento_install/var/cache.

    First refresh “Layered Navigation Indices” than rebuild “Search Index”.

    This entry was posted on Friday, January 30th, 2009 at 6:33 pm and is filed under Magento. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.
  • 7 Comments

    Take a look at some of the responses we've had to this article.

    1. " Refreshing, Clearing, Rebuilding Cache in Magento "

      Posted on June 8th

      Great post! Just wanted to let you know you have a new subscriber- me!

    2. " Refreshing, Clearing, Rebuilding Cache in Magento "

      geegee
      Posted on August 25th

      Thanks for your post! Your help and time is very much appreciated.

    3. " Refreshing, Clearing, Rebuilding Cache in Magento "

      Posted on August 27th

      The main cause of this problem is underresourced servers or very large product counts. Hence I developed several scripts to allow this process to be split up.

      You might also note that when ever you perform a product import or update the layered navigation cache will run.

      http://chrismckee.co.uk/magento-commerce-layered-navigation-cache-error-part-badger-part-duck/

    4. " Refreshing, Clearing, Rebuilding Cache in Magento "

      Posted on November 16th

      Hi Great post thanks for the info.

    5. " Refreshing, Clearing, Rebuilding Cache in Magento "

      Posted on December 1st

      We spent countless hours trying to get the Refresh of Layered Navigation Indices to work.

      We had close to 10000 products on pacwave.com runnning on a VPS, and nothing we did worked.

      The solution was to add RLimitCPU 1200 to the .htaccess file. This basically prevents the refresh script from consuming too much of the CPU resources and crashing.

    6. " Refreshing, Clearing, Rebuilding Cache in Magento "

      louis
      Posted on December 18th

      Dear Cj

      Whenever i perform a search i get the follwing error message SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

      Any ideas plz

    7. " Refreshing, Clearing, Rebuilding Cache in Magento "

      Posted on May 24th

      great, Thank you. saved me half a day.

  • Post a Comment

    Let us know what you thought.

  • Name:

    Email:

    Website:

    Message: