Moodle 2.4 session data in memcached

Moodle 2.4 session data in memcached

by Robert Zakrocki -
Number of replies: 3

Hi,

I am wondering if there is a way to store php session data in memcached? I have installed and configured memcahed to work with the current version of Moodle. I've manged to configure memcached plugin to cache following:

* Database meta information

* Question definitions

but I cannot find the way to store session data (or even session cache) in memcached. Does any one know if this is possible?

Many thanks,

Robert

Average of ratings: -
In reply to Robert Zakrocki

Re: Moodle 2.4 session data in memcached

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It is possible. The OU is using that, and we shared the code at https://tracker.moodle.org/browse/MDL-31501. That has not yet been included in the standard Moodle release.

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Moodle 2.4 session data in memcached

by Robert Zakrocki -

Many Thanks for your reply Tim. It is a pity that we cannot use it "out of box" at the moment. It would be such a big improvement on the performance specially big sites. I am sure it will eventually come to later version of official Moodle at some stage.

Robert

In reply to Tim Hunt

Re: Moodle 2.4 session data in memcached

by Anna Jonna Ármannsdóttir -

Does Your code solve the evictions problem associated with reboot of the memcached server as You pointed out referring to a blog post here http://dormando.livejournal.com/495593.html . The replies to this blog post, mentioned the possibility of having redundant memcached servers. However, the Moodle documentation implies only using nonredundant configuration. 

As a sysadmin for a small university, I am concerned that the students that are kicked out of sessions, would not get a fair chance to complete their tests. Since the file system is a bottleneck in my setup, I will not put the sessions in the file system. Any chance of eviction, however small is unacceptable, so this leaves me with sessions in the database with a memcached offload, preferably redundant. Does Your code support this type of setup? And if so, are there any examples of configuration?