#1 by Trontatuma
Anybody has seen such error and has hints what it could be? Dec 12 06:34:42 gefinal app/web.2 Error during __repr__ of Participant: InvalidRequestError('This Session\'s transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)\n(psycopg2.errors.DeadlockDetected) deadlock detected\nDETAIL: Process 910 waits for ShareLock on transaction 6006; blocked by process 102.\nProcess 102 waits for ShareLock on transaction 6005; blocked by process 910.\nHINT: See server log for query details.\nCONTEXT: while updating tuple (35,1) in relation "otree_participant"\n\n[SQL: UPDATE otree_participant SET _monitor_note=%(_monitor_note)s WHERE otree_participant.id = %(otree_participant_id)s]\n[parameters: ({\'_monitor_note\': \'P12\', \'otree_participant_id\': 1}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 3}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 4}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 10}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 13}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 16}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 18}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 19} ... displaying 10 of 12 total bound parameter sets ... {\'_monitor_note\': \'P12\', \'otree_participant_id\': 28}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 30})]\n(Background on this error at: http://sqlalche.me/e/13/e3q8)') Dec 12 06:34:42 gefinal app/web.2 Error during __repr__ of Participant: InvalidRequestError('This Session\'s transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)\n(psycopg2.errors.DeadlockDetected) deadlock detected\nDETAIL: Process 910 waits for ShareLock on transaction 6006; blocked by process 102.\nProcess 102 waits for ShareLock on transaction 6005; blocked by process 910.\nHINT: See server log for query details.\nCONTEXT: while updating tuple (35,1) in relation "otree_participant"\n\n[SQL: UPDATE otree_participant SET _monitor_note=%(_monitor_note)s WHERE otree_participant.id = %(otree_participant_id)s]\n[parameters: ({\'_monitor_note\': \'P12\', \'otree_participant_id\': 1}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 3}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 4}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 10}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 13}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 16}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 18}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 19} ... displaying 10 of 12 total bound parameter sets ... {\'_monitor_note\': \'P12\', \'otree_participant_id\': 28}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 30})]\n(Background on this error at: http://sqlalche.me/e/13/e3q8)') Dec 12 06:34:42 gefinal app/web.2 Error during __repr__ of Participant: InvalidRequestError('This Session\'s transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)\n(psycopg2.errors.DeadlockDetected) deadlock detected\nDETAIL: Process 910 waits for ShareLock on transaction 6006; blocked by process 102.\nProcess 102 waits for ShareLock on transaction 6005; blocked by process 910.\nHINT: See server log for query details.\nCONTEXT: while updating tuple (35,1) in relation "otree_participant"\n\n[SQL: UPDATE otree_participant SET _monitor_note=%(_monitor_note)s WHERE otree_participant.id = %(otree_participant_id)s]\n[parameters: ({\'_monitor_note\': \'P12\', \'otree_participant_id\': 1}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 3}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 4}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 10}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 13}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 16}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 18}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 19} ... displaying 10 of 12 total bound parameter sets ... {\'_monitor_note\': \'P12\', \'otree_participant_id\': 28}, {\'_monitor_note\': \'P12\', \'otree_participant_id\': 30})]\n(Background on this error at: http://sqlalche.me/e/13/e3q8)')
#2 by Chris_oTree
Did this affect any participant ? Did it only occur once or multiple times?
#3 by Trontatuma (edited )
The first time it affected some participants. The next time it was not there. Now, I got it again when it affected only of one participant and the error looked slightly different (see attached).
#4 by Chris_oTree
Were you running multiple web dynos? That could cause this. This type of error should not occur because oTree runs in a single thread so there should not be deadlocks.
#5 by Trontatuma (edited )
I am using 1 Performance-M web dyno
#6 by Trontatuma
Actually, I have autoscaling on. So it might be this, I will try without that. Thanks!