Failed to update mirror repository

Hi All,

So I have noticed that quite a few repositories tend to end up with this error. I have been running this instance for around 4/5 years. Its always kept up to date with the latest gitea versions but it seems this error always tends to happen for some reason.

Failed to update mirror repository '/var/lib/gitea/data/gitea-repositories/username/repo_name.git': fatal: Unable to create '/var/lib/gitea/data/gitea-repositories/username/repo_name.git/./objects/info/commit-graphs/commit-graph-chain.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

Does anyone know how to automatically sort this out as there are quite a few repo’s that tend to end up this way.

Is there a way to avoid this from happening as the “System Notices” tend to always have this lock issue.

Thank you for your assistance :slight_smile: