Courses 11

config.php for moodle


  • error_reporting = E_ALL & ~(E_NOTICE|E_DEPRECATED|E_STRICT)
  • display_errors = Off
  • register_globals = Off
  • register_long_arrays = On (this is deprecated, but questionnaire module depends on phpESP which uses register_long_arrays.)
  • post_max_size = 100M
  • file_uploads = On
  • upload_max_filesize = 100M
  • allow_url_fopen = On
  • date.timezone = America/Chicago

php cache

We use APC. Setting is default except:


People cannot view generated (completion) certificates and we get this error if we leave it to default 64MB. See Errors and Fixes.

Internal Zend error - Missing class information for in /disks/www/courses11/lib/fpdf/fpdf.php


During exams or sudden load surge, the server doesn't seem capable of spawning children fast enough. So it's better to keep enough servers up and running.

<IfModule prefork.c>
StartServers 80
MinSpareServers 20
MaxSpareServers 120
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000


  • max_connections: 2000
  • open_files_limit: 2500 (where?)

query cache

Query cache was off by default.
SET GLOBAL query_cache_size = 16777216; SHOW VARIABLES LIKE 'query_cache_size';


set global max_connections=2000; set-variable = max_connections=2000 SHOW VARIABLES LIKE 'max_connections'; /* Linux or Solaris should be able to support at 500 to 1000 simultaneous connections routinely and as many as 10,000 connections if you have many gigabytes of RAM available */
The default value by mysql is 151, but it's not sufficient for cehd courses site.

temporary table on disk (todo)

  1. MEMORY temporary tables can be 10-100 times faster than disk based MyISAM tables

show variables like 'tmp_table_size';

tmp_table_size | 16777216

show variables like 'max_heap_table_size';

max_heap_table_size | 16777216

show variables like 'key_buffer_size';

key_buffer_size | 8384512

set key_buffer_size=500000000 set global tmp_table_size=1000000000; set global max_heap_table_size=1000000000;


show variables like 'key_buffer_size'; | key_buffer_size | 8384512 |

directory layout

/disks/www/moodledata (From next years, use courses11data, courses12data, etc.)


In root's cron, we run daily backup of moodledata at 3am (rotates weekly) and weekly backup at 6pm Friday.

0 3 * * * /root/bin/ > /root/logs/backup-daily.log
0 18 * * Fri /root/bin/ > /root/logs/backup-weekly-hfb.log


We run 3 servers for the semester.

courses11 (production) - constellation
moodle11 (faculty) - vm
moodledev11 (developer) - vm