diff --git a/common_py/src/videoag_common/database/database.py b/common_py/src/videoag_common/database/database.py
index f8b26785d6e4241d49741502f185ae80be65cf1b..079c9b7dc1dfd47e97605e24514d8b8edb8038a1 100644
--- a/common_py/src/videoag_common/database/database.py
+++ b/common_py/src/videoag_common/database/database.py
@@ -2,6 +2,7 @@ import os
 import random
 import sys
 import time
+import traceback
 from enum import StrEnum
 from typing import Callable, TypeVar, TypeVarTuple, Sequence
 
@@ -224,7 +225,8 @@ class Database:
                 # Sleep a random time for up to 500ms to increase chance that next attempt succeeds (The randomness makes
                 # it more likely that we reattempt at a different time than the one with which we are in conflict right now)
                 time.sleep(random.random() / 2)
-                print("Warning: Reattempting transaction after commit conflict", e)
+                print("Warning: Reattempting transaction after commit conflict", file=sys.stderr)
+                traceback.print_exception(e)
                 continue
                 
         raise AssertionError("This should be unreachable code")