2011年1月2日 星期日

git - out of memory (OOM)

If you just cannot get over with the issue, e.g. clone-ing or fetch-ing, just transfer the .git directly.

Disable auto gc by:

git config --global gc.auto 0


git clone ....
remote: fatal: Out of memory, malloc failed (tried to allocate 272691112 bytes)
Fixed by:
git repack -adf --window-memory=256m


Re: git gc - out of memory
http://lists-archives.org/git/705379-git-gc-out-of-memory.html
http://lists-archives.org/git/705471-git-gc-out-of-memory.html
git repack -adf --window=memory
--window-memory=[memory]


Git clone fails with out of memory error - "fatal: out of memory, malloc failed (tried to allocate 905574791 bytes) / fatal: index-pack failed" - Stack Overflow
http://stackoverflow.com/questions/7607970/git-clone-fails-with-out-of-memory-error-fatal-out-of-memory-malloc-failed
git config pack.windowMemory 10m
git config pack.packSizeLimit 20m
git repack -a -d

(......)

git clone will not look at your pack.packSizeLimit setting, it'll anyway transfer everything in a single pack - unless it changed since the last time I looked.


git - Large pack causes git clone failures ... what to do?
http://git.661346.n2.nabble.com/Large-pack-causes-git-clone-failures-what-to-do-td5481488.html
A clone doesn't split its pack. It stores the entire project
as a single pack file. If your filesystem cannot do that, the
clone fails.


git-repack(1) - Linux man page
http://linux.die.net/man/1/git-repack

git gc: Out of memory, malloc failed
http://blog.richliu.com/2011/04/22/1050/

沒有留言: