diff --git a/python/LbNightlyTools/Utils.py b/python/LbNightlyTools/Utils.py
index da23a844c23384dd2b6b88966b4648895c300e73..3d13535cc6731cb369269367e8f791fac20cd6d2 100644
--- a/python/LbNightlyTools/Utils.py
+++ b/python/LbNightlyTools/Utils.py
@@ -1117,8 +1117,10 @@ def postToMergeRequest(name_or_id, mreq_iid, message, new_comment=False, token=N
                     and note.type != "DiscussionNote"
                 )
             ]
-            if own_plain_notes:
-                last_note = own_plain_notes[0]
+            last_note = own_plain_notes[0] if own_plain_notes else None
+            # update an existing note only if it is not too long
+            # gitlab has a limit of 1000000 characters
+            if last_note and len(last_note.body) < 500000:
                 last_note.body = last_note.body + "\n" + message
                 last_note.save()
             else: