I am getting an error like this in the site. How can I resolve it? I am using Memcache for session storage. My Magento version is 2.1.15

Warning: SessionHandler::read(): Unable to clear session lock record in /var/www/vendor/magento/framework/Session/SaveHandler/Native.php on line 22

Anyhelp thanks...


1 Answer 1


This happens when your session.save_handler PHP parameter is set to some another session storage than files (for example, redis, memcached, and so on). This is a known issue we’re working to resolve.


Locate php.ini

Locate php.ini by entering the following command:

php -i | grep "Loaded Configuration File"

Typical locations follow:

  • Ubuntu: /etc/php5/cli/php.ini
  • CentOS: /etc/php.ini


  1. As a user with root privileges, open php.ini in a text editor.
  2. Locate session.save_handler
  3. Set it in any of the following ways:

To comment it out:

;session.save_path = <path>

To set it to a file system path:

session.save_handler = files


  1. https://devdocs.magento.com/guides/v2.1/install-gde/trouble/php/tshoot_session.html

  2. https://github.com/magento/magento2/issues/5319

I hope this will help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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