Hi All,
I'm looking for a little help in identifying what I'm doing wrong.
I run a moodle site for a small number of students (40 tops) and have been finding that users are being disconnected especially in chats but not only chats. There are 3 courses but only two being used. At times I can see that there are only 2 or 3 logged in users and I get the error message below in my log file.
neonataltraining.eu [Tue Oct 14 08:57:31 2014] [error] [client 81.145.165.2:39041] AH01215: PHP Warning: mysqli::mysqli(): (42000/1203): User myusername already has more than 'max_user_connections' active connections in /home/sites/neonataltraining.eu/public_html/moodle2/lib/dml/mysqli_native_moodle_database.php on line 375
I tried to check and repair the MYSQL tables but understand I can't do that for an INNODB database.
On the live site I get the following from debugging...
3.404709 secsRAM: 70.3MBRAM peak: 71.5MBIncluded 408 filesget_string calls: 5140DB reads/writes: 169/5DB queries time: 0.13984 secsticks: 340 user: 97 sys: 48 cuser: 0 csys: 0Load average: 7.18Session (core\session\database): 73.4KBCaches used (hits/misses/sets)core/databasemeta** static acceleration **: 0 / 5 / 0cachestore_file: 5 / 0 / 0core/string** static acceleration **: 4673 / 662 / 0cachestore_file: 662 / 0 / 0core/langmenu** static acceleration **: 6 / 1 / 0cachestore_file: 1 / 0 / 0core/plugin_managercachestore_file: 3 / 0 / 0core/yuimodulescachestore_file: 3 / 0 / 0core/coursecatcachestore_session: 7 / 0 / 2core/eventinvalidation** static acceleration **: 0 / 2 / 0cachestore_file: 0 / 2 / 0core/coursemodinfocachestore_file: 1 / 0 / 0core/repositoriescachestore_static: 0 / 9 / 18Total: 5361 / 681 / 20
From a duplicate site on the same server I ran perspective.php and got...
Moodle System Benchmarks Note for Moodle 1.7 and above: Disable the record cache (Site Admin -> Server -> Performance) for realistic results! | |||
---|---|---|---|
Processor performance | |||
Function calls | 4062000 | 3577000 | |
Regular expression replaces over 1KB of text | 22700 | 25800 | |
Disk performance | |||
16KB files read from disk (cache) | 3900 | 5300 | |
16KB files written to disk (cache) | 800 | 200 | |
Database performance | |||
Get_record calls on the course table | 930 | 1010 | |
Insert_record calls on the course table | 80 | 280 | |
Update_record calls on the course table | 60 | 1050 | |
Maximum concurrent users (approx): | 115 |
The system...
php 5.3.28
moodle 2.6.5+ (Build: 20141002) Only additional modules are 'questionnaire' and bootstrap theme.
mysql 5.5.33
apache 2.4.9
Shared hosting with Heart Internet in the UK
Redhat Linux
From the host info regarding the server I'm on:
- Dual Quad Core Intel(r) Xeon(r) processors
- 32 GB RAM
- Dual SAS Drive (for the operating system)
- RAID Mirroring (for the operating system)
- Dual Power Supplies
- Quad Gigabit Network Adapters
Having upgraded several times I wonder whether the config.php is outdated???
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'notmoodle';
$CFG->dbuser = 'notmoodleuser';
$CFG->dbpass = 'notgoingtorevealthis';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array(
'dbpersist' => false, // should persistent database connections be
// used? set to 'false' for the most stable
// setting, 'true' can improve performance
// sometimes
'dbsocket' => false, // should connection via UNIX socket be used?
// if you set it to 'true' or custom path
// here set dbhost to 'localhost',
// (please note mysql is always using socket
// if dbhost is 'localhost' - if you need
// local port connection use '127.0.0.1')
'dbport' => '', // the TCP port number to use when connecting
// to the server. keep empty string for the
// default port
);
$CFG->wwwroot = 'http://www.neonataltraining.eu/moodle2';
$CFG->dataroot = '/home/sites/neonataltraining.eu/mydatafolder';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
$CFG->passwordsaltmain = 'notrevealingthiseither';
require_once(dirname(__FILE__) . '/lib/setup.php');
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
If there's more information that I
Thanks for your help on the matter.
Colin