Welcome Guest, Not a member yet? Register   Sign In
Session: Error while trying to free lock for ci_session
#45

(06-07-2016, 09:56 AM)spjonez Wrote:
Quote:Is it possible that the key is being removed by redis between your call to exists and del? When I run a simple test script against this sequence I get 1 for the del response.

It's always possible something else is happening, but just wanted to point out that it is theoretically possible for the key to get expired between those two round trips.

Quote:Redis is already single-threaded, so when you get right down to it, only one del or exists call can get executed at the same time anyway. A small multi block or LUA script just makes sure that both commands execute atomically (avoiding race conditions).

It appears to be a concurrency issue when multiple requests are involved which makes sense as everyone reporting the issue is firing AJAX calls. Unless you want to add "concurrent AJAX calls are likely to cause session lock errors" to the session documentation it needs to be changed at the framework level.

This is a meaningless conclusion ...
Reply


Messages In This Thread
RE: Session: Error while trying to free lock for ci_session - by Narf - 06-08-2016, 01:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB