colinmollenhour / Cm_Cache_Backend_Redis

A Zend_Cache backend for Redis with full support for tags (works great with Magento)
Other
389 stars 142 forks source link

Products dissappear from categories #87

Closed csdougliss closed 9 years ago

csdougliss commented 9 years ago

Hi,

I am having an issue with a store that 2 products sometimes disappear from a category (it happens elsewhere too in other categories).

It can be difficult to replicate locally as we have Varnish (Turpentine module) running in front (with a 1 hour cache life time).

Our setup is a Load balancer to 2 servers. On each server is Varnish->Nginx->Magento with Redis Cache installed locally. They connect to a shared redis session and mysql database.

I have checked the relevant indexing tables and they appear to be correct (but there are so many I might have missed them). If I run a full reindex the products are back (but that was before the varnish cache clear so that might or might not be related).

If I clear Block HTML Output (this in invalidated) and refresh the varnish cache then the products appear again. I do not believe it's a varnish issue as it just simply caches what's their at the time.

I also have cron scripts that run on a separate server for the admin that do things like update the inventory state. They don't disable the products.

My question, when I finally get to the point is - if our admin server is used for editing products, saving products, update stock quantities and it connects to it's own redis cache instance (not shared with the other 2 servers), how does this affect the block output? Could this have anything to do with the products dissappearing?

Also indexing is set to re-index on save. Magento is EE 1.14.1.0

Thanks

colinmollenhour commented 9 years ago

Yes, you should never ever ever use separated cache instances since cache invalidations on one instance will not be communicated to the other instances. Do yourself a huge favor and run only one cache instance. Note, however, that using separate session instances would actually work since the frontend and backend use different cookies anyway.