Potential issue when using memcache session save handler in PHP

Posted by Sean on Stack Overflow See other posts from Stack Overflow or by Sean
Published on 2010-12-31T00:24:06Z Indexed on 2010/12/31 0:54 UTC
Read the original article Hit count: 187

Filed under:
|

I have two load balanced web servers, and I'm using the memcache session save handler with the save path pointing to two memcache servers. It's configured with session redundancy set to two (the number of memcache servers). So PHP is writing session data to both memcache servers, and when I take one of the servers down, everything seems to work fine since the session data has been written to both memcache servers.

The problem seems to happen when I use the app for a while with only the one memcache server up, and then bring the other one back up. My theory is that the memcache server comes back up, and PHP then starts asking it for session data which isn't there since it was written to the other server while this one was down. Is there any merit to this theory? Should PHP be asking both servers for the session data and maybe there's some other problem?

© Stack Overflow or respective owner

Related posts about php

Related posts about memcached