Issue Details (XML | Word | Printable)

Key: MDL-18241
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Dan Poltawski
Reporter: Dan Poltawski
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

My Moodle generating 12,000 database queries per pageload

Created: 14/Feb/09 07:29 AM   Updated: 17/Feb/09 12:26 PM
Return to search
Component/s: Performance
Affects Version/s: 1.9.4
Fix Version/s: 1.9.5

File Attachments: 1. Text File 0001-performance-mymoodle-MDL-18241-Assigments-were-ver.patch (5 kB)
2. Text File MDL-18241-fastpatch1.patch (1 kB)

Environment: mysql

Participants: Dan Poltawski, Petr Skoda and Tim Hunt
Security Level: None
QA Assignee: Tim Hunt
Resolved date: 16/Feb/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
We had some reports of slowness on one of our moodle sites. It turned out the school had my moodle redirect switched on.

Upon investigating the performance log I discovered for a single user /my/ page was causing 12401 database queries.

Here is a perf log line from my dev machine (artificially fast due to front/backend being the same).

[Tue Feb 10 19:38:55 2009] [error] [client 10.0.0.5] PERF: /my/ time: 5.407977s memory_total: 21916276B (20.9MB) memory_growth: 21626784B (20.6MB) memory_peak: 22259484B (21.2MB) includecount: 80 dbqueries: 12401 ticks: 541 user: 211 sys: 144 cuser: 0 csys: 0 serverload: 0.11 rcache: 0/0

I want to investigate this and search and destroy whatever is causing it. This obviously cripples a moodle site with my moodle redirection.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Poltawski made changes - 14/Feb/09 07:35 AM
Field Original Value New Value
Assignee Martín Langhoff [ martinlanghoff ] Dan Poltawski [ poltawski ]
Dan Poltawski made changes - 14/Feb/09 07:43 AM
Attachment queries-mymoodle.log [ 16275 ]
Dan Poltawski made changes - 14/Feb/09 08:34 AM
Attachment MDL-18241-fastpatch1.patch [ 16276 ]
Dan Poltawski made changes - 14/Feb/09 10:31 AM
Comment [ Attaching querylog (4MB!) ]
Dan Poltawski made changes - 14/Feb/09 10:31 AM
Attachment queries-mymoodle.log [ 16275 ]
Dan Poltawski made changes - 16/Feb/09 03:09 AM
Attachment 0001-performance-mymoodle-MDL-18241-Assigments-were-ver.patch [ 16284 ]
Dan Poltawski made changes - 16/Feb/09 03:27 AM
Attachment 0001-performance-mymoodle-MDL-18241-Assigments-were-ver.patch [ 16284 ]
Dan Poltawski made changes - 16/Feb/09 03:28 AM
Dan Poltawski made changes - 16/Feb/09 10:19 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Tim Hunt made changes - 17/Feb/09 12:04 PM
QA Assignee timhunt
Tim Hunt made changes - 17/Feb/09 12:19 PM
Status Resolved [ 5 ] Closed [ 6 ]