many queries at login after update to 1.8.2+

many queries at login after update to 1.8.2+

by Tobias Marx -
Number of replies: 4
hi,

we just updated our 1.6+ installation to 1.8.2+ (2007021520) and over all everything worked out fine. we managed to work out smaller glitches pretty fast (missing mods, etc.).

but there is one issue that causes some trouble.

we have got a few users who are enroled in many courses. for those users logging in (and "log in as" that user) takes very long and produces an insane number of queries.

i have checked fixed and open issues on the tracker and here in the forums, but nothing really fits to our problem.

here is the debug info of the login page after successful login of one of those users:

23.300709 secs
RAM: 7.6MB
Included 41 files
DB queries 51240
ticks: 2331 user: 1766 sys: 150 cuser: 0 csys: 0
Load average: 1.46
Record cache hit/miss ratio : 0/0

the user is enroled in 328 courses.

i would really appreciate any help on this issue.

many thanks in advance,
Tobias

ps. user load is that high because the cron.php also runs for ages. above problem still exists when no cron.php is running. i'll have to look into that problem later smile
Average of ratings: -
In reply to Tobias Marx

Re: many queries at login after update to 1.8.2+

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is a known problem, and hard. Martin Langhoff from Catalyst IT is working on it, but that won't be ready to go into Moodle 1.9 even.

Until then, a work around may be to enrol that person in some course categories instead.
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: many queries at login after update to 1.8.2+

by Tobias Marx -
hi tim,

thanks for that info. we will look into course categories and determine if we can use them in our case.

i hope they'll have a better test setup for the next release. from what i have read they never really tested 1.8 on a site with "many" courses.

br,
Tobias
In reply to Tobias Marx

Re: many queries at login after update to 1.8.2+

by Wen Hao Chuang -
We tested 1.8.2 with "many" courses and felt that it was NOT yet that stable enough for large deployment, so we continue to run 1.8.2 as a "pilot testing" site which would buy us more time to work on the performance issues.

For the problem that you mentioned, we actually have a solution. One of our staff programmers created a new block called "My iLearn Courses" to replace the original "course_list" block, which would break down the the courses based on the course categories they belong (see attached screenshot). This has dramatically reduced the time to load the list of all courses that you are enrolled in. I currently don't have time to fully document it but if people are interested we could put it up either here or in the CONTRIB or 3rd-party-module list. Please also help us test it if you find any issues. thanks!
Attachment my_ilearn_course.png