Hi Everybody,
I had problem with "/admin/cron.php". Each run costs me betwing 200 and 190 seconds server time. During this time no changes can be saved to the DB.
And I had alot calls from students with subject "very often the system halts for a while ( up to 30 seconds)".
I have Dell server with 4 Xeon 3Ghz/20Gb Ram with(Ubuntu/MySql). There is nothing except one totaralms installation.
This problem can not be a server performance issue.
After analysis I found that two SQL query take all this time. You can find them here:
/home/danil/Desktop/Work/CloudU/hierarchy/type/competency/evidenceitem/type/coursecompletion.php (line 103)
/home/danil/Desktop/Work/CloudU/hierarchy/type/competency/evidenceitem/type/activitycompletion.php (line 157)
I don't want make any deep db optimizations but I done next:
I solved this issue for me and would reccomend you to include these indexes in your next update.
I had problem with "/admin/cron.php". Each run costs me betwing 200 and 190 seconds server time. During this time no changes can be saved to the DB.
And I had alot calls from students with subject "very often the system halts for a while ( up to 30 seconds)".
I have Dell server with 4 Xeon 3Ghz/20Gb Ram with(Ubuntu/MySql). There is nothing except one totaralms installation.
This problem can not be a server performance issue.
After analysis I found that two SQL query take all this time. You can find them here:
/home/danil/Desktop/Work/CloudU/hierarchy/type/competency/evidenceitem/type/coursecompletion.php (line 103)
/home/danil/Desktop/Work/CloudU/hierarchy/type/competency/evidenceitem/type/activitycompletion.php (line 157)
I don't want make any deep db optimizations but I done next:
- For table comp_evidence_items_evidence(in my table 469000 rows) I added index "CREATE INDEX useriditemid_ix on {prefix}_comp_evidence_items_evidence (`userid`,`itemid`)" and run cost decreased to 26 seconds.
- For table comp_evidence_items_evidence(in my table 203000 rows) I added index "CREATE INDEX useidcriteriaid_ix on {prefix}_course_completion_crit_compl(`userid`,`criteriaid`)" and run cost decreased to 4 seconds.
I solved this issue for me and would reccomend you to include these indexes in your next update.