Reputation: 3391
I'm experiencing inconsistency in my $_SESSION
variable which is defined to be saved in memcache
. What are popular reasons for mixup between sessions values?
I'm using session_start()
at the start of scripts, but sometimes the $_SESSION
variables gets set to an older version.
Upvotes: 0
Views: 462
Reputation: 950
It can be a session locking issue. With normal flow when PHP handles the request it blocks the session file from reading/writing (only this process can read/modify this file).
So when another request (lets say AJAX request) has to wait till first request finish and unlock the session.
With memcache session locking is probably disabled by default so in situation like that :
In this case you will have session inconsistency, because request A will overwrite changes made by request B.
Upvotes: 1