QuestionQ37

VerifiedStore Operations and Admin

An Architect is investigating a merchant’s Adobe Commerce production environment in which all customer session data is being lost at random. Customer session data is configured to persist in Redis, as are all caches (except the full-page cache, which Varnish handles).

After an initial review, the Architect can reproduce the customer-session-data loss by flushing the Magento cache storage, either through the Adobe Commerce Admin Panel or by running bin/magento cache:flush on the command line. Refreshing all caches in the Adobe Commerce Admin Panel or running bin/magento cache:clean on the command line does not cause session data to be lost.

What should be the next step?

Explanation

Redis session storage and Redis cache storage must use different Redis database numbers. If they share a database, a Magento cache-storage flush can delete session keys along with cache keys, which logs out customers and loses their session data. Adobe Commerce recommends separate database numbers for each caching type and session storage to protect against this data loss.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!