Getting resource limit errors on hostserver? Speed up your moodle script.

Getting resource limit errors on hostserver? Speed up your moodle script.

by Richard Kingsley -
Number of replies: 0

How to speed up moodle and avoid resource limit on shared hostservers: ( I have been using 2.6.4)

Here are list of things that I did that helped:

1)   Delete all users off the site that are not currently using it. (Site admin/Users/accounts/browse list of users)

I had over 3000 users on my site and only 75 were current.  Cleaning this up and optimising (see #8)  had the greatest effect on my moodle script speed.

2) Turn off the self-registration to the site once your students have logged on.  This stops strangers from logging onto the site which prevents problem number one from happening. (site admin/plugins/authentication/manage authentication/). On this page disable  self registration and hide guest login button.

3)        Stop the script from accumulating unnecessary data:

(site admin/server/cleanup)

a) Delete not fully set up users after 2 days

b) Delete incomplete users after 2 days

c)  Untick log guest access

d)  Keep logs for 10 days to stop the databases from getting huge.  ( I have never used the statistics)

e)  Disable grade history (Most people do not need to track changes)

f)  Set the delete grades time to 150 days if semestered or 300 days if non-semestered.

  • 5) I did read that going to file based sessions was quicker but I got database errors from doing that so I kept mine the same. (site admin/server/session handling/use database for session)

Top of Form

Bottom of Form

 

6) In the site administration/advanced options, disable anything you do not need.  I did not tick the boxes for the following to keep them disabled:

Enable outcomes

Enable comments

Enable tag functionality

Enable notes

Enable portfolios

Enable web services (not ticking increases site security)

Enable statistics

Enable RSS feeds  (This is a cool feature to have if your course needs to get input from media sites.  I did not need it)

Enable blogs  (Consider using blogging software separately if you need it.)

Enable completion tracking (A cool feature, but I did not need it)

Enable conditional tracking (A very cool feature to get students to be competent at one level before going to the next but it does increase database usage)

Enable plagiarism plugins

Enable badges

I did tick : Enable messaging system

7) Set up an automatic cron job or run it manually on a regular basis.

8  Optimise your databases using phpMyAdmin or similar.  Open up the moodle database.  Tick on all the databases and in the dropdown box select optimize table.


Average of ratings: Useful (1)