Welcome Guest, Not a member yet? Register   Sign In
redis driver _get_lock set lock_key problem
#1

Hi there,

i am using CI 3.1.6, latest php7.0-redis.

I get following error messages multiple times a day (30+ ajax requests per second):
- Session: Error while trying to obtain lock for ci_session:...
- Severity: Warning --> session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (tcp://localhost:6379) Unknown 0

I added debug information to the _get_lock method inside Session_redis_driver.
$ttl in line 338 is -2 but _redis->set($lock_key...) in line 345 returns FALSE because the lock_key already exists at this position (or it sets the key and returns FALSE for another reason).

Is it possible, that another task creates this lock_key meanwhile? What else could be the problem that _redis->set returns false but lock_key exists with ttl 300 after it?

(I tried to call session_write_close() in constructor of my application to remove the lock faster but then the above error is shown for that line of code)

Thanks a lot, best regards,
helot
Reply


Messages In This Thread
redis driver _get_lock set lock_key problem - by helot - 10-12-2017, 03:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB