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

(This post was last modified: 03-04-2017, 03:43 AM by Nichiren.)

That's funny - I arrived at this post after Googling my error and the top result is me asking about the same error two years ago. I recently had a spate of Redis "read error on connection" issues which I managed to resolve by throwing more Redis at it but that in turn just exacerbated the "Error while trying to free lock for ci_session" issue which I never fixed so I'm attempting it again.

As Narf suggested, it is probably slow page loads. My average app server response time is < 60ms while my average page load time hovers around 8s. However, the page load range varies significantly from a min of 13ms to a max of 31500ms which is not entirely unexpected since I run a user generated content site where around 80% of my users are now on mobile with a good number of them in developing areas with unreliable connections. So assuming the problem with the session errors do indeed lie with slow page loads, is it because the session lock is held until a page is fully rendered and is highly dependent on a user having a fast connection? Or should I actually be looking for a section of my site somewhere that really is taking >5 seconds to process that my monitors and profilers may be missing?

Environment (updated since I first started this thread):
CI 3.1.3
Nginx 1.11.10
PHP 7.0.15
Ubuntu 16.04
Sessions are now saved in a dedicated Redis cluster separate from regular cache
Twemproxy for distributed Redis sessions across multiple servers

Updated config since first thread post:
PHP Code:
$config['sess_save_path'] = '/home/user/site/nutcracker/session.sock'
Reply


Messages In This Thread
RE: Session: Error while trying to free lock for ci_session - by Nichiren - 03-03-2017, 11:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB