Issue Details (XML | Word | Printable)

Key: MDL-15947
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: Nivaldo A. P. de Vasconcelos
Votes: 0
Watchers: 1
Operations

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

Moodle locks the mysql database after some student/guest insertion on courses which belong to a meta-course

Created: 05/Aug/08 07:06 PM   Updated: 23/Oct/08 05:04 AM
Return to search
Component/s: Database SQL/XMLDB, Performance
Affects Version/s: 1.9.2
Fix Version/s: None

File Attachments: None
Image Attachments:

1. htop.screen.jpg
(226 kB)
Environment: 2 server Linux ubuntu (kernel image 2.6.20-16-server) : application with 4 Xeon E5345 processors, RAM 5.8GB; database with 4 Xeon E5345 processors, RAM 4.0 GB.

Database: MySQL
Participants: D P, Dan Poltawski, Eloy Lafuente (stronk7) and Nivaldo A. P. de Vasconcelos
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
The moodle locks after a few insertions of students / visitors in a course which is linked to a meta-course. One of the database server processor is fully occupied and no other request for database is treated. It is as if there was a LOCK command in the database without answer.


From mytop application, it's possible to see the following query:
SELECT COUNT(DISTINCT prs.userid) FROM (SELECT ra.userid, ra.roleid AS primary_roleid, ....

It's attached the screen from htop.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Nivaldo A. P. de Vasconcelos made changes - 05/Aug/08 07:12 PM
Field Original Value New Value
Attachment htop.screen.jpg [ 14764 ]
Description The moodle locks after a few insertions of students / visitors in a course which is linked to a meta-course. One of the database server processor is fully occupied and no other request for database is treated. It is as if there was a LOCK command in the database without answer.
The moodle locks after a few insertions of students / visitors in a course which is linked to a meta-course. One of the database server processor is fully occupied and no other request for database is treated. It is as if there was a LOCK command in the database without answer.


From mytop application, it's possible to see the following query:
SELECT COUNT(DISTINCT prs.userid) FROM (SELECT ra.userid, ra.roleid AS primary_roleid, ....

It's attached the screen from htop.
Dan Poltawski added a comment - 06/Oct/08 10:57 PM
Hi Nivaldo, could you give any more details about the query in question?

Entry in slow query log or full details for the query?

I can't find the query you reffer to when searching the moodle codebase.


Dan Poltawski made changes - 06/Oct/08 10:57 PM
Component/s Database SQL/XMLDB [ 10131 ]
Security Serious security issue [ 10000 ]
Component/s Performance [ 10221 ]
Component/s Database Activity [ 10092 ]
Priority Blocker [ 1 ] Major [ 3 ]
Component/s Administration [ 10050 ]
D P added a comment - 22/Oct/08 09:48 PM
Maybe I can second that:

MDL-16955


Nivaldo A. P. de Vasconcelos added a comment - 23/Oct/08 05:04 AM
Hi Dan,

I have no idea about that query. After turn off the statistics module the did not happens more.
That query seems built on processing. I will check where I found the code closest on moodle codebase and post here.

Best regards,
Nivaldo