My Moodle site has suddenly become incredibly slow to log users on. In the order of 2+ minutes
Once users are logged in, the site performs perfectly well.
What should I check to fix this issue?
My Moodle site has suddenly become incredibly slow to log users on. In the order of 2+ minutes
Once users are logged in, the site performs perfectly well.
What should I check to fix this issue?
What is Moodle checking the authentication against? Manual/Internal accounts? AD accounts? External database?
If it's any thing external, check that external source for poor performance. If it's internal, make sure there's no locking or similar occurring on your <prefix>_user table.
Yeah it's just manual accounts. I would like it to check against AD, but that's for another day.
How can I see if the table is locked in the database? PHPMyAdmin?
A couple of things ...
If site is using DB for sessions, turn that off ... ie, set it to 'files'.
If site has been used for a while, cron jobs run, could be your logs are already getting large. Consider setting logging to a shorter period of time. Upon logging on user is authenticated AND logged.
Would help to know some more specific info concerning setup. Suggestions made for Linux standalone server admins much different than remotely hosted shared system on 'Wonders' (hope not!).
'spirit of sharing', Ken
Hi Ken,
Yes it is a standalone Ubuntu (linux) server.
I had a look and Sessions DB was already turned off. I have changed the logging period to a shorter time now as well.
Still no noticeable improvement in logon time. Could it be the locked database thing?
What do you mean by 'standalone'. Is this really a box that you can point at or a VM? If the latter, how are the disk(s) organised?
Failing that, is this slow login just the administrator account or all accounts?
Is there a way to see what is actually happening when someone logs in, to find out why it takes so long?
Yes, it's called Profiling. It will show exactly what methods and functions are running, what order and the time they take.
Tim Hunt wrote a nice article about it here: http://tjhunt.blogspot.com.au/2013/05/performance-testing-moodle.html