Last Repository Check Failed

I hope this is the right place to post this.

I have a 96.9 GB GItLab Project with a large number of commits. It hasn’t caused any problems on the Git side of things … until now.

I’m seeing the following error when I open the project in GitLab:

Last repository check (1 week ago) failed. See repocheck.log for error messages.

When I go to that log file in GitLab (repocheck.log), it’s empty. So I logged into GitLab via Terminal, went to /var/log/gitlab/gitlab-rails/ and saw all the archived repocheck.log.##.gz files were only 20 bytes in size (so empty I’m assuming) … except for one on Sept 11, 2020 (11 days ago from the creation of this post).

You can see the contents of the archived log file here (obviously I’ve replaced the team and Project with generic team and Project).

Any ideas as to what is going on and how to resolve this?

Alright, so I think I may have found a soft-fix for this issue:

In the Terminal I went to each /var/opt/gitlab/git-data/repositories/team/Project.git/objects/## directory that contained 0-byte Hexadecimal file[s], created a temporary folder in ## (such as tmp or empty) and moved the 0 byte file[s] into them.

So a laborious task, but the next time I ran the Repository check in GitLab (clicking Trigger repository check button), now it says This repository was last checked Sep 22, 2020 12:58pm. The check passed. I’ve pasted the contents of repocheck.log from GitLab (once again, changing the team and Project names).

I’m dubious to whether it actually passed properly. After moving 0-byte Hexadecimal files to tmp/empty directories, I am …

  1. Still receiving Could not fsck repository error
  2. Still receiving unable to mmap errors and now with No such file or directory (I did move them)
  3. Still having Verifying commits in commit graph: 81% be the last full entry before Verifying com

This was also a manual soft-fix on top of all this, so I wouldn’t be surprised if repocheck.log fails again in the future.