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.

9 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. Hey nice post. Thanks for sharing this great post with us. It was truly very interesting post.

    Magento Development

    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