I recently migrated a system from an Ubuntu 12 based four-webserver setup to an Ubuntu 16 three-webserver setup in a new data centre . The system uses memcache for the session handler. The session is used to determine whether a user is logged in or not and which user is logged in. It worked perfectly on the Ubuntu 12 setup.
On the new Ubuntu 16 setup, every now and then when I login, I get immediately logged out (session disappears). The system also allows me as an administrator to switch between users (which basically changes the session data to the new selected user). When I do this, sometimes it will switch back to the old user when I navigate to another page.
This all sounds to me like the memcache session is not working 100% and I sometimes get old session data, either from when I was logged out, or when I was a different user.
How do I debug this to determine what the problem is? My google searches have found how to debug memcached
but not memcache
Here is the relevant config from php.ini
:
session.save_handler = memcache
session.save_path="tcp://10.32.82.2:11211?persistent=1&weight=1&timeout=1&retry_interval=15,tcp://10.32.82.3:11211?persistent=1&weight=1&timeout=1&retry_interval=15,tcp://10.32.82.4:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
Here is the relevant config from memcache.ini
:
extension=memcache.so
[memcache]
memcache.dbpath="/var/lib/memcache"
memcache.maxreclevel=0
memcache.maxfiles=0
memcache.archivememlim=0
memcache.maxfilesize=0
memcache.maxratio=0
memcache.allow_failover=1
memcache.session_redundancy=4
0 Answers