We have about 15K products and 500 catalog rules. What's been happening is that during the application of rule changes or new rule creation we've noticed that the front-end temporarily looses discounts on products causing customers to see an increase in prices, even when in cart.

Is this even normal behaviour?

Given the rules takes almost 45' to complete indexing it is almost unacceptable to have these issues.

Magento version 2.2


1 Answer 1


What I think is most likely happening here (without diving into the source code) is that there is a gap between when Magento generates the prices and when it saves it.

Magento stores the calculated prices for products which have price rules applied to them in a special index table, so it can retrieve the prices quickly whenever the price needs to be displayed.

When re-indexing, affected products have their records deleted from the index table and the new prices are inserted. If the re-indexing takes a while as you suggest and customers are still browsing the site, then Magento appears to be falling back to the non-disocunted price (because it has just deleted entries from the index table).

Possible solutions

I can think of two ways to work around this. There may be other, maybe even better solutions, but these are the ones which spring to mind immediately.

  1. Run the catalogue price rule indexer at a time no-one will notice the blip in prices, i.e. the middle of the night. Therefore your customers will never even see the price blip. Indexer scheduling can be configured in the admin.

  2. Enable Full-Page Cache (FPC). If you do this, Magento will cache the entire page, including any prices on it. The cached pages will survive until the end of the re-indexing process, at which point the cache will be refreshed. FPC can have some side-effects, however, so I recommend further research into whether this is right for your situation before you enable it!

  • Hi there and many thanks for in the in-depth explanation. FPC is enabled and works great but doesn't solve cart pricing. Furthermore non-visited pages will not only show wrong pricing but also cache it if visited a 'glitch' timing. The off times proposal is something we are looking at but very difficult to apply given personnel doesn't work those hours plus sometimes there is a need for immediate changes. I would have preferred Magento deploying a dB transaction during delete and update per product be commit at completion to minimize glitch times....
    – George
    Commented Jul 30, 2018 at 14:39
  • @George Yes, of course, FPC does not apply to cart pages. I forgot that in my hastily drafted response. You could always investigate hole-punching the product price block - that would solve your other question about non-visited pages, but that's outside the scope of my answer. I guess the only other option is to put the site on maintenance mode during index refresh - probably not something you want to contemplate. Commented Jul 30, 2018 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.