Question

I am using Git on a virtual server hosted by dreamhost with 2GB memory. I run git gc every morning at 4AM and consistently for the past week, dreamhost process reboot send an email stating that due to the fact that I have consumed more than 2GB memory, they have rebooted my server to stop the process that is consuming the memory.

The repository size is 10GB in size. I have looked extensively before posting this, but is there a log file that Git creates that will allow me to see what file Git was 'touching' that caused the server forced restart?

Was it helpful?

Solution

As far as I know, there is no secret method of logging what was happening. However, with a repository containing large objects, the git repack step may want to use huge amounts of memory, even with a small(ish) (i.e., default) --window and --depth.

The solution (besides avoiding silly restrictions on VM :-) ) is to use git config to set pack.windowMemory to some suitable limit. See Repack of Git repository fails as well. (I have not run into this situation myself but this seems like the obvious answer, at least.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top