Index: openacs-4/packages/assessment/tcl/as-session-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-session-procs.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/assessment/tcl/as-session-procs.tcl 3 Sep 2024 15:37:35 -0000 1.14 +++ openacs-4/packages/assessment/tcl/as-session-procs.tcl 27 Oct 2025 13:12:45 -0000 1.15 @@ -37,6 +37,7 @@ # Insert as_session in the CR (and as_sessions table) getting the revision_id (session_id) set transaction_successful_p 0 + set retry 5 while { ! $transaction_successful_p } { db_transaction { @@ -61,7 +62,11 @@ [list consent_timestamp $consent_timestamp] ] ] set transaction_successful_p 1 } on_error { - ns_log notice "as::session::new: Transaction Error: $errmsg" + ns_log notice "as::session::new: Transaction Error: $errmsg retry: $retry" + if {[incr retry -1] < 1} { + ns_log error "as::session::new: Transaction failed after retries" + ad_script_abort + } } } # }