Moodle caches for application are changing without notice?

Moodle caches for application are changing without notice?

by Christos Savva -
Number of replies: 3

Hello all


I am having a problem with Moodle Caches.


I have created a Memecached instance in my Moodle for files and assigned the application mappings to the memcached instance.

After assigning the memcached instance Moodle is running perfect. Speed it good, loading time is good etc.


The weird things: After 2-3 days Moodle becomes very slooooowww. I check the Cache Plugin Configuration and everything is fine, application mappings are still showing memcached, BUT if I enable Moodle statistics I see that memcached is not used! wide eyes.

I go back to the Cache Plugin Settings, I reset the application to default, then put it back to the Memcached instance, everything running ok again.


My questions

  1. Under what conditions Moodle may automatically switch mappings from the memcached instance to the default? And if this is the normal behavior how can I get notified or fix it?
  2. Why the GUI does not update to reflect that Moodle is using normal cache?

Any advise on the issue?

cache1

cache2

Average of ratings: -
In reply to Christos Savva

Re: Moodle caches for application are changing without notice?

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Christos,
AFAIK:

  1. cache store not available
  2. corruption in the static - changed only via admin GUI when playing with the store settings - mapping file, <moodledata>/muc/config.php

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Moodle caches for application are changing without notice?

by Christos Savva -

Thanks for the reply.


so:


1. Something is wrong with my memcached server (eg Moodle loses connectivity with server)

2. I never touched the muc/config.php file manually, everything I did it was done using Moodle GUI


Thanks for the confirmation, I will check further smile

In reply to Christos Savva

Re: Moodle caches for application are changing without notice?

by Christos Savva -

Coming back to my first question, I did a small experiment.


I installed memecached on an Ubuntu Server and used it on Moodle. I was monitoring the connection to memcached and yesterday Moodle started being very slow again. I checked the memcached server and I got the following when I did

$ service memcached status
memcached.service - memcached daemon
   Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-07-28 08:36:47 UTC; 6 days ago
 Main PID: 17970 (memcached)
    Tasks: 6
   Memory: 45.8M
      CPU: 1min 13.801s
   CGroup: /system.slice/memcached.service
           └─17970 /usr/bin/memcached -v -m 1024 -p 11211 -u root -l x.x.x.x:11211
Jul 28 08:36:47 systemd[1]: Started memcached daemon.
Aug 03 19:24:53 systemd-memcached-wrapper[17970]: accept4(): Too many open files
Aug 03 19:24:53 systemd-memcached-wrapper[17970]: Too many open connections


Then I wanted to try ElasticCache from Amazon AWS Services. I created a memcached instance and applied it to moodle. Here are some graphs I got from AWS.


ElasticCache Current Connections

ElasticCache New connections


Is this normal? Current connections always increasing?