500 on diff views in merge requests


Running on gitlab.com I seem to have a single repo that is returning 500 on the diff views and won’t load them in the merge requests.

I have tried other repos even in the same group and they seem fine just this single one that returns 500.

Anyone had the same issue or someone at support I can send link to the repo to (it’s private and I can’t link it here)


Is it a MR with a large diff? (either a single file or lots of changes)

GitLab has an epic where they’re tracking a number of issues with loading large diffs: https://gitlab.com/groups/gitlab-org/-/epics/1417

I recommend upvoting and optionally commenting on the relevant one(s).

As to your one MR, :thinking: I’m not sure there’s a lot to be done other than to close the MR and create a new one with less changes. You should be close it via API: https://docs.gitlab.com/ee/api/merge_requests.html

1 Like

It’s not a very large one. Only a hand full of files (8 or so) and maybe 100 or so line changes. Just seems to be this repo though which is the strange part.

Anyone got any thoughts on this one? It’s not even merge request if I try and load a diff view for a commit just in the commit list it will 500 on that page. Other repos are fine…

So after testing this repo and walking back commits I found that the added .gitattributes file with:

* text=auto

Once I removed the file it fixed the diff…

Seems the file was set as UTF-16LE which breaks any feature diffs. Changing to UTF-8 also fixes the issue.

Related ticket: https://gitlab.com/gitlab-org/gitlab-foss/issues/23179