Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: RedisHandler does not working on sessionExpiration is zero #3111

Closed
fz19 opened this issue Jun 17, 2020 · 0 comments
Closed

Bug: RedisHandler does not working on sessionExpiration is zero #3111

fz19 opened this issue Jun 17, 2020 · 0 comments
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@fz19
Copy link

fz19 commented Jun 17, 2020

Describe the bug
RedisHandler does not working on sessionExpiration=0.

CodeIgniter 4 version
v4.0.3

Affected module(s)
CodeIgniter\Session\Handlers\RedisHandler

Expected behavior, and steps to reproduce if appropriate
i changed to redis session handler.
a website responded very slow and occured error.

Session: Unable to obtain lock for ci_session:1ifssq8spcfduehb418uk09fajq92li3 after 30 attempts, aborting.

i trace to this error. it seem to fail set value to Redis because sessionExpiration is zero.

if ($this->redis->set($this->keyPrefix . $sessionID, $sessionData, $this->sessionExpiration))

ci4 docs say sessionExpiration=0 is "non-expiring session (until browser is closed)" but it actually work to set TTL zero (then set action fail)

Please consider this issue.
thank you.

Context

  • OS: CentOS Linux release 8.1.1911
  • Web server: nginx/1.17.6
  • PHP version: 7.4.3 (php-fpm)
@fz19 fz19 added the bug Verified issues on the current code behavior or pull requests that will fix them label Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

1 participant