light
light

Reputation: 43

PHP7.1 using memcached as save handler, session start slow

I used memcached as session save handler, and configured in php.ini as below:

session.save_handler = memcached session.save_path = "127.0.0.1:11311"

and other options is default.

When running in php7.1.0 there will be session_start() slow log.

I am tested the configuration with PHP5.5, and had no this issue.

I want know what's the bug caused by, and which version of php solved or maybe sovle this issue in other way?

There is my full env:

PHP 7.1.0 libmemcached version => 1.0.18 CentOS release 6.6 (Final) nginx version: nginx/1.10.3

Thanks.

Upvotes: 3

Views: 2162

Answers (1)

Alexander Lisogurskiy
Alexander Lisogurskiy

Reputation: 76

Had similar problem with sessions in memcache. In our case it was connected with the session.lazy_write. Once we set session.lazy_write = 0 the session start working fast.

More details can be found here - https://github.com/php-memcached-dev/php-memcached/issues/310.

Doesn't look like your case, but might be useful.

Upvotes: 3

Related Questions