Skip to content

500 Response: "Unable to clear session lock record" during checkout when using Memcached for sessions #5319

@ghost

Description

Red Hat Enterprise Linux Server release 6.8 (Santiago)
php-common-7.0.8-1.el6.remi.x86_64
php-pecl-memcached-3.0.0-0.1.20160217git6ace07d.el6.remi.7.0.x86_64
memcached-1.4.27-1.el6.remi.x86_64

Steps to reproduce using PHP 7.0.8 with Memcached 1.4.27 for Session Storage on RHEL 6.8 x64

  1. Install Magento from 2.0, 2.1 and develop CE branch.
  2. Ensure PHP Memcached Session Lock Wait Minimum is default value of 0

    php -i|grep sess_lock_wait_min

    memcached.sess_lock_wait_min = 0;
  3. Add Configurable Product to the cart.
  4. Attempt to complete checkout

Expected result

  1. Checkout completes without any error responses from server.

Actual result

  1. Occasionally, Error occurs: "500 Response" During AJAX Checkout Steps, No UI feedback.
  2. Error is logged in var/report/$(date +%s)

    a:4:{i:0;s:187:"Warning: SessionHandler::read(): Unable to clear session lock record in /var/www/magento2/demo_example_com/lib/internal/Magento/Framework/Session/SaveHandler/Native.php on line 22";i:1;s:6232:"#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'SessionHandler:...', '/var/www/magent...', 22, Array)

Possible Workaround

  1. Edit /etc/php.d/50-memcached.ini

    - memcached.sess_lock_wait_min = 0;

    + memcached.sess_lock_wait_min = 250;
  2. Restart PHP-FPM

As this setting was not identified as required in the following documents, I am curious if 250 milliseconds is a good value and if it may impact any other areas of functionality.
http://devdocs.magento.com/guides/v2.1/install-gde/system-requirements.html
http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions