Welcome Guest, Not a member yet? Register   Sign In
Session: performance lock problem
#1
Sad 

Hi all
I have turned on Memcache driver for sessions but got delay for a 5-20 seconds, page loading slow and with delays. I figured out that locks caused delay. I put session_write_close to the end of the scripts but that didn't help to solve the problem. How can I fix this?

Thanks
Reply
#2

Hm, switched to redis and works just fine. It seems some problems with memcache extension.
Reply
#3

FYI, putting session_write_close() at the very end of script execution is useless - CI will do that on its own at that point.

If you do use it, it has to be at a point where you no longer need to read/write new session data, but more code is to be executed - thus, the lock is freed as soon as necessary while the rest of your code still executes.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB