integer-net/magento2-session-unblocker

Cart is empty after successful add to cart when using 'disable_locking' => '1'

Closed this issue · 4 comments

Magento 2.3.1

Redis session config
'disable_locking' => '1'

  1. Use slow local env or qa with big DB
  2. Start adding product to cart during page loading or concurent ajax request, likely section loading
  3. See the message that product is added to cat
  4. However the cart is actually empty

Did you notice something like this ?

when the page is completely loaded and no ajax calls are processed then adding to cart works well

Well, this would actually be the idea of this module. Our module is an alternative to disabling session locking, since we saw the potential issue of what you just described.

It seems disable_locking is used a lot 'out in the wild' including on Magento's own cloud solution, but we're very cautious with it. Hence this module.

@wigman
thanks for clarification
then what is the best combination of usage config and your module ? :)

I'm really not the right person to tell you about your required timeout, lifetime, compression (etc etc) settings for Redis. That really depends on your requirements, plus I'm not the expert on that subject.

The important thing related to our module, that I can tell you, is to set disable_locking to 0 when using our module.
Setting it to 1 defeats the whole purpose of our module :)

It can be also caused by the disabled persistent cart module.