Quiz

 
 
Tim at Lone Pine Koala Sanctuary
Re: Deadlock message while attempt quiz
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Well, upgrading 2.3.1 -> 2.3.x should be a minor change that is safe to do at almost any time, and you should plan to do that regularly, after each minor release, to get the latest security and bug fixes.

Upgrading 2.3.x to 2.4.y or 2.5.y is a bigger change. You need to read the release notes, perhaps give some advanced warning to your staff.

So, I would say, a minor upgrade is something you could do at the weekend. For a major upgrade you might consider planning to do those during the schoold vacation.

Since I don't know why you are getting these deadlocks, I cannot guess if it is likely to happen again when the teacher re-runs the quiz. Did it happen a lot, or was it just one or two students?

 
Average of ratings: -
Picture of Shin Hiorie
Re: Deadlock message while attempt quiz
 

Dear Tim,

This happen a lot when the student number around 30 person take the exam in same period of time.

Is there any tuning that i can make ?

 

tq

 
Average of ratings: -
Picture of Shin Hiorie
Re: Deadlock message while attempt quiz
 

Dear Tim,

I've digged into postgres log ... got some clue here

2013-05-27 15:01:01 MYT LOG:  incomplete startup packet
2013-05-27 15:03:02 MYT LOG:  incomplete startup packet
2013-05-27 15:05:04 MYT LOG:  incomplete startup packet
2013-05-27 15:07:07 MYT LOG:  incomplete startup packet
2013-05-27 15:09:01 MYT LOG:  checkpoints are occurring too frequently (28 seconds apart)
2013-05-27 15:09:01 MYT HINT:  Consider increasing the configuration parameter "checkpoint_segments".
2013-05-27 15:09:08 MYT LOG:  incomplete startup packet
2013-05-27 15:11:11 MYT LOG:  incomplete startup packet
2013-05-27 15:13:13 MYT LOG:  incomplete startup packet
2013-05-27 15:14:26 MYT LOG:  checkpoints are occurring too frequently (29 seconds apart)
2013-05-27 15:14:26 MYT HINT:  Consider increasing the configuration parameter "checkpoint_segments".
2013-05-27 15:14:30 MYT ERROR:  deadlock detected
2013-05-27 15:14:30 MYT DETAIL:  Process 16560 waits for ShareLock on transaction 74671603; blocked by process 16569.
2013-05-27 15:14:30 MYT STATEMENT:  UPDATE mdl_quiz_attempts SET currentpage = $1
2013-05-27 15:14:43 MYT LOG:  checkpoints are occurring too frequently (17 seconds apart)
2013-05-27 15:14:43 MYT HINT:  Consider increasing the configuration parameter "checkpoint_segments".
2013-05-27 15:15:03 MYT LOG:  checkpoints are occurring too frequently (20 seconds apart)
2013-05-27 15:15:03 MYT HINT:  Consider increasing the configuration parameter "checkpoint_segments".
2013-05-27 15:15:10 MYT ERROR:  deadlock detected
2013-05-27 15:15:10 MYT DETAIL:  Process 16797 waits for ShareLock on transaction 74672210; blocked by process 16802.
2013-05-27 15:15:10 MYT STATEMENT:  UPDATE mdl_quiz_attempts SET currentpage = $1
2013-05-27 15:15:13 MYT ERROR:  deadlock detected
2013-05-27 15:15:13 MYT DETAIL:  Process 16804 waits for ShareLock on transaction 74672256; blocked by process 16816.
2013-05-27 15:15:13 MYT STATEMENT:  UPDATE mdl_quiz_attempts SET currentpage = $1
2013-05-27 15:15:14 MYT LOG:  checkpoints are occurring too frequently (11 seconds apart)
2013-05-27 15:15:14 MYT HINT:  Consider increasing the configuration parameter "checkpoint_segments".
2013-05-27 15:15:15 MYT LOG:  incomplete startup packet
2013-05-27 15:15:16 MYT ERROR:  deadlock detected
2013-05-27 15:15:16 MYT DETAIL:  Process 16803 waits for ShareLock on transaction 74672256; blocked by process 16816.
2013-05-27 15:15:16 MYT STATEMENT:  UPDATE mdl_quiz_attempts SET currentpage = $1

 

The "Consider increasing the configuration parameter "checkpoint_segments"." and the "checkpoints are occurring too frequently (11 seconds apart)"

 

I need to increase the checkpoint segment ???

 

tq

 
Average of ratings: -
Picture of Shin Hiorie
Re: Deadlock message while attempt quiz
 

I've set my checkpoint_segment from default value 3 o 10. Will monitor the problem. thank you

 
Average of ratings: -
Picture of Shin Hiorie
Re: Deadlock message while attempt quiz
 

In my case i had to update my postgres checkpoint_segment to 64 to overcome the problem. Increased to 10 and 32 still get the deadlock.

Thanxs

 
Average of ratings: -
Picture of Doug Moody
Re: Deadlock message while attempt quiz
Group Particularly helpful Moodlers

Shin,

Can you tell us where you went to change the number in case we want to do the same?

 
Average of ratings: -
Picture of Shin Hiorie
Re: Deadlock message while attempt quiz
 

Dear Doug,

You can edit it in postgresql.conf ( mine located in /usr/share/pgsql/postgresql.conf) file. Please read about it in google coz it will consume your server memory if it is set unwisely.

tq

 
Average of ratings: -