Magento – Very long time for Mage_Core_Model_Session_Abstract_Varien::start

ee-1.14ee-1.14.1.0memcachedredissession

We are using Magento EE 1.14.1.0 and are seeing very long times for Mage_Core_Model_Session_Abstract_Varien::start method. We tried using Memcached and Redis for session storage both with the same result.

Is this normal? Is this a New Relic problem? Any ideas how to fix it?

Screenshots below:
Memcached session
Redis session

I will be very grateful for any suggestion.

Best Answer

There is multiple issues for this case.

First Magento recommend Memcache for M2, I suppose the same for M1 : http://devdocs.magento.com/guides/v2.0/config-guide/memcache/memcache.html We had experiment this issue with Redis and we change session_save to db.

The second, is located here : Mage_Core_Model_Resource_Session::gc. Randomly Magento clean session. This clean cause a lock. A solution is to disable this random clean and use a cron to do the job (overload this class and change $_automaticCleaningFactor value to 0). This works great for us (with db).

Hope this help,