Gradebook is not opening

Gradebook is not opening

by anita bankar -
Number of replies: 2

My Moodle version is 2.9. Around 2000 students has been enrolled to my course.whenever I click on Grades ,next page does not open and after some time it give error "Error while writing to Database"

In reply to anita bankar

Re: Gradebook is not opening

by David Conrad -

Hi Anita, did you ever get this fixed? We are seeing the same issue after deleting some grade categories. See https://moodle.org/mod/forum/discuss.php?d=336527

Turning debugging on will show helpful info about the cause. To get there, go to Site Admin> Development> Debugging. Details listed here: https://docs.moodle.org/29/en/Debugging 

In reply to David Conrad

Re: Gradebook is not opening

by Tammy Moore -

If it is a very large course with a large enrollment, increase your max_allowed_packets. You can even increase this in PHPMyAdmin in the SQL query window. 

You can find what it currently is with the query:

show variables like 'max_allowed_packet'

The default is usually 268435456 which is 268 mb. that is too small for a busy site with large courses and lots of quizzes. Try increasing it using ...

set global max_allowed_packet=563870912

and see how that does. if you still cannot get in, go up higher.

We have just had to bump ours up this week when we had the grade book time out after trying to unlock a grade over-ride in a course with around 700 students and 160 plus quizzes. I changed ours to 888888888 and immediately the quizzes and grade book became available again. I guess I was in an 8 mood today. This weekend when it is less crazy, I plan to go in with more attention and fine tune it and get SSH in to the config file to make it permanent. When you set it in PHPMyAdmin, it is not permanent. The next server restart will drop it down to the original setting. But, for a quick visit to PHPMyAdmin just to see if that will do the trick it is a great diagnostic tool.