I have a Moodle platform on WAMP architecture (2 app servers and 1 db server, all working with the same shared directory for moodle files). Php 5.5.12 Apache 2.4.9 Mysql 5.6.17 Win server 2012r2

The site is in an internal, closed network, site whereas users are identified through active directory (ldap tree).

The site is very slow. Every time we are trying to enter the site, it takes around 30 seconds to load the page, and these are the first network entries on chrome console:

Index.php, status 303, initiator-other, size 612b, time 23 sec

Index.php?testsession=11, status 303, initiator- http://mooc/login/index.php, size 429b, time 763 ms

mooc, status 200, initiator- http : // mooc / login / index.php?testsession=11, size 38kb, time 4 sec

30 seconds thia part alone.

As some of you might notice, the site's address is http://mooc/

This testsession=11 seems suspicious, isn't it?

What do you say?


  • How do you share the same directory for data? Is this a SMB/CIFS share, or maybe DFS? Have you tested with a local directory instead? Do you have single sign-on enabled in web server? – sam_pan_mariusz Nov 23 '15 at 14:48
  • We are using CIFS, with local storage (and one server instead of 3) everything worked well. About SSO- How can i check if I'm using this ? – Gavriel Goidel Nov 23 '15 at 15:13

Moodle 2.9 by default uses file based sessions that are stored in moodledata directory. If your moodledata is on network shared storage it is most likely the source of slowdown. PHP does not handle file sessions well on network shared storage facilities. Switch session storage to server local directory for example by setting this in your config.php:

$CFG->session_file_save_path = "path to my local dir";
  • What do you do if you are running Moodle on a multi-server load-balanced setup and you have more than one Moodle server? What should $CFG->session_file_save_path point to? – luisdev Sep 3 '18 at 9:28

You may look at your MySQL configuration. It may need some customization. To check if MySQL needs customization, you can use scripts like mysqltuner.pl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.