Syed,
I fixed it in:
But you need to set $CFG->memcached *and* add a segment of code to your config.php:
It turns out that the code in LTIX.php - restore session is not the code that actually restores the session.
When you are running multiple servers, the code in config.php tells PHP to store the sessions using either memcache or memcached.
They both use a memcached server - memcache is a pure PHP implementation and memcached is a PHP+C implementation. Both work well. You need to install whichever one you plan to use with apt-get on ubuntu. My Ubuntu install scripts install both.
If this is non-Linux (i.e. windows), I might prefer memcache as it does not need any non-php libraries dropped in.
Back to the restoreLTISession() in LTIX.php, that code does not restore the session - PHP restores the session - restoreLTISession() was an experiment to see if when PHP could not restore a session, I would try to restore it manually. In all my testing, I don’t think my super complex recovery code in LITX.php ever found a lost session.
I *am* using memcached all the time on my production servers even though none of my servers are load-balanced any more. It speeds up single instance installs as well, keeping load off the database and local file system.
So if you git pull, you should be able to add the $CFG->memached option *and* the code to config.php and you should be lad balancing all day long.
Let me know how it goes.
/Chuck
P.S. The removal of the memcached config variable was part of my PHP 8.0 cleanup. Thanks PHP 8 :)