Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

redis driver _get_lock set lock_key problem

$
0
0
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

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>