CodeIgniter: Codeigniter session error in Redis using PHP 7.0
When I store session data in the Database, there are no errors. But if I switch to Redis, I get an error every time session tries to regenerate via session_regenerate_id, in my case every 300 sec. But if I refresh the page again, Redis get updated and page loads without errors.
A PHP Error was encountered
Severity: 4096
Message: session_regenerate_id(): Failed to create(read) session ID: user (path: tcp://localhost:6379?auth=xxxx)
Filename: Session/Session.php
Line Number: 625
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (6 by maintainers)
Commits related to this issue
- Fix #4362 — committed to bcit-ci/CodeIgniter by narfbg 8 years ago
As I was saying this is not a proper fixing of the problem, and anyone reading this shouldn’t go for that “solution”, as it’s not a solution, it’s just a workaround, and that’s not great at all…
If there is a problem, it’s still there and it requires fixing.
Has anyone found a resolution for the
Session: Unable to obtain lock for ci_session:xxx
issue when using Redis for sessions?We are also seeing this on PHP 7.4.20 and CI 3.1.11, and it is always related to concurrent ajax requests.