Repository garbage collection failed


I’m running Gitea 1.9.4 on Raspberry Pi 4 b (4 GB). After call “Repository garbage collection” after some time I get the error:

exec(345:Repository garbage collection) failed: signal: killed(context deadline exceeded) stdout: stderr: :

I didn’t see any errors in the gitea.log.


Having similar issue:

Repository garbage collection failed for /var/lib/gitea/data/gitea-repositories/HIDDEN/HIDDEN.git. Stdout: 
Error: context deadline exceeded

Can’t find related error in logs as well.

Gitea Version: 1.18.0+rc1-9-g757b49ec5

What that means is It took too long, some repo is too big.
Please increase the limit of [git.timeout].GC.

I switched to an Intel NUC with SSD and I icreased this

GC = 7200

And? Does the problem still occur?

I added to the app.ini file the recommended values:

GC = 7200

I ran outside of gitea (but on the server) the following code on each repository:

git gc --prune --aggressive

On the bigger repositories, I saw that it was running out of memory. I increased the swap (1024 instead of 100).
After this change, the gc command could be passed everywhere.

I restarted the gitea service and forced the garbage collector in gitea.

This time only the three largest repositories are in error.

Here is the error for one of them:

2023/01/11 00:07:16 .../repository/check.go:44:func1() [W] [63bdedf0] Failed to health check repository (&{406 20 open-sources-external <nil> veracrypt veracrypt Clone of  0  master 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 false false false false <nil> 0 map[] map[] [] <nil> false 0 <nil> false 0 212578474 <nil> <nil> true false [] default  1652739267 1673379390}): context deadline exceeded