Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Redis 6.0 issues with session locking #2382

@exussum12

Description

@exussum12

We are seeing issues of sessions disappearing and then coming back which started happening when moving to redis 6 from 5.3.7

This happens when the session lock is triggered

Expected behaviour

Session lock waits and then acquires a lock

Actual behaviour

Lock not acquired and the page load looks as if the session doesnt exist.

I'm seeing this behaviour on

  • OS: Ubuntu 22.04
  • Redis: 6.2.6
  • PHP: 7.4
  • phpredis: 6

Steps to reproduce, backtrace or example script

Adding to php.ini

session.save_handler = redis
session.save_path = "redis-node:6379"
redis.session.locking_enabled=1
redis.session.lock_retries=10

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch

Not fully sure what the issue is, but looks like nothing in dev

Looking at the diff between 5.3.7 and 6, the backoff strategies were added so im guessing its related to that, but I can't see the docs on adding to the php.ini for the session.

Happy to trial a solution.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions