Moodle 2.4 struggling with over 20-30 or so users

Moodle 2.4 struggling with over 20-30 or so users

David Smith發表於
Number of replies: 4

Dear all,

Please help!

I am a big Moodle fan and want to make full use of it in our school but whenever I invest time to set it up, it seems to struggle to cope with what seems like a relatively small number of users (around 20+).

I started several years ago with Moodle installed on an online server via shared hosting. It was slow and problematic so we moved it (this was something like v1.7) to a locally hosted file server in our school.

We found it had real problems when more than one class tried to log in at roughly the same time. Each class has up to 30 people and we would hope to have up to 3 classes on at once (approx 90 students).

We gave up at the time but then invested in a dedicated server. It is Windows based (I know, but it may be a big leap to change OS) and it's running XAMPP 1.8.1 and PHP 5.3.5. We've got v 2.4.1 installed. Our server has 8GB RAM, a 2.4GHz AMD Opteron server and it's 64 bit.

When only one person is logged in, either as a student or an admin, it works v well.

I have tried turning on "use database for session information" but not sure it helps.

The server is designed to be accessed from home as well as school. We tried using config.php to point it to a local server if logged in from school but we had problems when students tried to access materials that had been uploaded via the internet - they had to log in twice or just couldn't see them.

I have read loads of pages of advice on this forum and tried loads of things (inc eaccelerator) but seem to keep hitting the same performance brickwall.

I assume it is some kind of memory setting in httpd.conf or php.ini but can't figure out what. I am a bit new to this side of things.

I would be grateful if someone wiser than me can cast their eye over the settings in the attached php.ini, config.php and httpd.conf files and spot the mistake I am making.

Many thanks

David

評比平均分數: -
In reply to David Smith

Re: Moodle 2.4 struggling with over 20-30 or so users

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
Hi

This may not be connected to performance at all, still what is "$myhost = $_SERVER['HTTP_HOST'];" in config.php doing?

You say:
> The server is designed to be accessed from home as well as school. We tried using config.php to point it to a local server if logged in from school but ...

Could you elaborate on that? Aren't you using the same URL within the school LAN and from home?

config.php
<?php
unset($CFG);
$CFG = new stdClass();
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle2';
$CFG->dbuser = '******';
$CFG->dbpass = '*********';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';
$myhost = $_SERVER['HTTP_HOST'];
$CFG->wwwroot = 'http://moodle.oursite.org.uk/moodle';
$CFG->dirroot = 'E:\wwwroot\moodle';
$CFG->dataroot = 'E:\moodledata';
$CFG->admin = 'admin';
$CFG->passwordsaltmain = '*********************************************';
$CFG->disableuserimages = true;
$CFG->directorypermissions = 00777;
require_once("$CFG->dirroot/lib/setup.php");
?>

P.S. I believe, you've seen this comment: "The default configuration is not good from a securtiy point of view and it's not secure enough for a production environment - please don't use XAMPP in such environment." http://www.apachefriends.org/en/xampp.html.
評比平均分數:Useful (1)
In reply to Visvanath Ratnaweera

Re: Moodle 2.4 struggling with over 20-30 or so users

David Smith發表於

Dear Visvanath,

Thanks for getting back to me. I see you contribute a great deal on here and appreciate your time.

I am not sure about the $myhost = $_SERVER['HTTP_HOST'];" line. I am not an expert and it may be a vestige from past work done by a technician who had attempted to tackle the need for a fast log-in from in school.

Yes, at the moment we force logins via an http://www.etc.com URL. At one time, we had it detect a local login and, if it was from in school, the path became http://file-server/moodle . We thought that might help avoid the problems with many users at the same time.

The problem was that links to resources (e.g. PDF documents) which had been uploaded from home would still try to open via http://www.etc.com

Do you think that this is what is causing us problems?

Many thanks,

David

In reply to David Smith

Re: Moodle 2.4 struggling with over 20-30 or so users

Visvanath Ratnaweera發表於
Particularly helpful Moodlers的相片 Translators的相片
Hi

No problem! Of course if you find a post useful you are free to rate it as 'Useful' so that some good karma get accumulated in the other party's ruck sack.
微笑

The $myhost thing must be a relic. Hope somebody else would comment.

> Yes, at the moment we force logins via an http://www.etc.com URL. At one time, we had it detect a local login and, if it was from in school, the path became http://file-server/moodle .

So you had your site called by different URLs in the past. That could break links to internal resources because Moodle stores absolute paths in the database. See http://docs.moodle.org/24/en/Moodle_migration#Changed_URL_image_links_set_to_old_site.
評比平均分數:Useful (1)
In reply to David Smith

Re: Moodle 2.4 struggling with over 20-30 or so users

Jon Witts發表於
Plugin developers的相片 Testers的相片

Please also have a read of Masquerading for details of how to set up your Moodle to be accessed from the same URL inside and outside of school without loosing internal speed benefits whilst in school.

Jon