We have a problem with our Moodle Server and Purge caches when someone makes a purge caches from the web, each user requesting the page creates a new Apache process intended to reconstruct the file cache and local cache where the theme is.
Also, it takes ~10 minutes to complete the whole process when a single person is accessing the site at not conventional hours like @11pm.
We manage an AWS Architecture with a Load Balancer, 2 ECS (m5.2xlarge) instances with PHP 7.1 and Apache 2.4, moodledata in EFS and local cache in each node.
Is this a correct behavior? Should each request launch a new Apache process to recreate the cache for the theme?
This is our SCSS: https://gist.github.com/anonymous/304623908a70acfa30c08adbac48e14a
it's a very customized site and I know that's the reason the compilation of SCSS takes that amount of time, but it shouldn't create multiple APACHE processes to the point that the node CPU usage gets to 100% and the site goes down or is it intended?
What do you recommend? Is it working as intended? Or is a configuration I am missing?
Thanks in advance and feel free to ask me anything I should mention but forget.
Thanks for your response, but we already applied that fix and the problem persist, what I want to know if the moodledata refresh should be requested by multiple users or is something I'm missing.
Here is a screen of the two nodes before doing the purge caches:
And after the purge:
You can see the apache process spiking per user request.
Maybe purge caches/install of modules should be executed with the site in maintenance mode? I didn't have this problem in 2.x
We just upgraded from 3.2 to 3.3.5 (Build: 20180405)
We also have a load balanced system and are getting reports from our users of certain functionality not working in some browsers. For example, ajax not working, can't click 'Add an Activity or Resource', HTML editor not loading fully (just displays HTML), etc.
I haven't been able to recreate the issues the users are experiencing and have had some reports that the problem no longer occurs after some time has passed.
I did purge caches after the upgrade, could this be related? If so is there something I can do as an admin to prevent this from happening?
I tried your example on my staging environment and I do not see those kinds of spikes you are seeing. How does your server behave when you have theme designer mode enabled? Recommend you don't test this in production .
I had an incident where the ACLs/permissions were acting up in moodledata and this caused these kinds of nasty spikes when I tried to purge the caching or turned on theme designer mode.
Hope this helps.