Monday, May 18, 2009

Magento: slow product updates

Ever since I upgraded to 1.3.1 simply saving a product takes a very long time (2-3 minutes). This was driving me (and others updating products) crazy.

I finally resolved the issue. I was reviewing the MySQL processlist while magento was updating a product and noticed a very long running thread:

invalidating query cache entries (key) DELETE FROM `catalogindex_aggregation` WHERE (aggregation_id IN (SELECT `catalogindex_aggregation_to
I had enabled query caching per this post on the magento groups. When I disabled query caching in MySQL the slow product updates issue disappeared. Now saving a product only takes 2-3 seconds.

24 comments:

  1. We had a similar issue, but we found that the issue was because we were running the server as a virtual machine. When we ran the import on hardware, the save times per product went from 15-50 seconds to .5 seconds. Hope that helps someone...we sure banged our heads against the wall!

    ReplyDelete
  2. I have a site created with Magento Custom Development. I also had the same problem. I tried lots of thing but cant get the solution. After reading your post, I get the solution of my problem.

    ReplyDelete
  3. Could you clarify, what exactly did you do to turn off caching? I've tried adding 'query_cache_type = 0' as well as 'query_cache_size =0', but it didn't work for me. Still saving a product takes 1-2 minutes on a dedicate 2 x P4 CPU machine with 2GB RAM and catalog of 1800 products.

    ReplyDelete
  4. I came on your blog for the first and I have seen your work. I must say you have maintained your Blog really well. Good on you.
    magento ecommerce developer

    ReplyDelete
  5. tridominator this was really nice answer you provided but can some one please help me as i'm yet confused :(

    ReplyDelete
  6. Thank you for sharing this post about the best techniques for Magento Development, This is very useful for Magento Development and Magento Development Company. Thanks again :) Magento Development

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. The link of the procedure to avoid it is no longer visible.
    How did u fix the problem and what are the my.cnf values to be turned off?
    In my store it takes 60 sec to save a product with magento 1.6.0

    ReplyDelete
  9. hi there - i might need your help in tuning our magento store. if you can drop me an email to guy@zirconmania.com i would appreciate it

    ReplyDelete
  10. Great post. I really appreciate your blog as it is impressive and informative. Thanks for sharing such an useful info.
    Website design

    ReplyDelete
  11. so was it the cache causing problem!

    ReplyDelete
  12. Indeed when a large number of goods or attributes need to be saved, backend works very slow, as each time you save data the system re-indexes the goods through the entire catalog.

    Asynchronous Re-indexing is a solution of this problem. When a product or category is saved it is not immediately re-indexed, but put into a queue. The queue is re-indexed in the background. This greatly speeds up the backend. This mechanism is implemented by using an extension of http://mirasvit.com/magento-extensions/magento-asynchronous-reindex.html.

    Even in case you place online shop even on a good hosting, sometimes the products, categories and attributes are saved slowly. This is due to the need to clear the cache and run re-indexing of stored items.

    ReplyDelete
  13. Magento Enterprise Edition 1.14.2 now comes with Google Tag Manager so merchants can more easily add tracking tags to a Magento site for audience measurement, personalization, retargeting, search engine marketing, and more without modifying code.

    regards-
    Magento and Ecommerce solution

    ReplyDelete
  14. I am happy that I found your post while searching for informative post about magento developer. It is really informative and quality of the content is extraordinary.

    ReplyDelete
  15. I want to thank you for this good read!! I certainly loved every little bit of it. I have got you saved as a favorite to look at new stuff you post…
    Domain Age Checker

    ReplyDelete
  16. Ecommerce websites attract thousands of buyers by offering great deals and better prices.Lots of ecommerce websites are being developed in order to fulfill market demands
    eCommerce Development Services Company in Bangalore | Magento developers in Bangalore

    ReplyDelete
  17. This is a great post. I like this topic.This site has lots of advantage. It helps me in many ways.Thanks for posting this again.
    magento development company in bangalore 

    ReplyDelete
  18. i want to say thank you for these Latest News updates
    This is the best post. Thank you for posting this.

    ReplyDelete
  19. Thank you for posting such nice article read. I am very glad to read this. Really good one.
    Web Designing Company in Bangalore, Web Development Company Bangalore

    ReplyDelete
  20. I absolutely admired every bit of it and i additionally accept you book apparent to analysis out fresh things in your site.
    UI Designing Company in Bangalore, Web Application Development Companies in Bangalore

    ReplyDelete