Open roy-work opened 1 year ago
IIRC it’s not unbounded, but libgit2’s limits are a bit optimistic. You can set the MWINDOW_FILE_LIMIT via the raw bindings (libgit2-sys).
IIRC it’s not unbounded, but libgit2’s limits are a bit optimistic.
It was holding onto 53% of the total size of the volume, at which point the volume ran it out of space.
You can set the MWINDOW_FILE_LIMIT via the raw bindings
The only hit I get for MWINDOW_FILE_LIMIT
on Google is a copy of this issue, and libgit2's doc's search doesn't recognize it.
For my reference, the docs page.
(The commit indicates that the default for that is unlimited.)
We have a long-running daemon that does some stuff with a repository.
We noticed that the disk backing the repository was "full":
That might see illogical, but that's a hint that deleted files are being held open. If we
ls
our daemon's open files, that confirms it:So, we can see here that we're holding a bunch of packfiles, which explains why the used space is so much higher than the
du
total.We keep the
git2::Repository
object around: I think I didn't know if it was expensive to create, and we only have two repos, so we just create thegit2::Repository
objects are startup, and then keep them as global state.But that seems to cause a "disk" leak, over repeated fetches & repacks.