【git/内源开发】fatal: Out of memory, malloc failed问题的解决
2015-11-03 22:43
836 查看
fatal: Out of memory, malloc failed (tried to allocate 3179053026 bytes)
fatal: index-pack failed
主要是由于32位和64位机的不同导致的,用下面的方法可以解决
参考地址:http://stackoverflow.com/questions/8855317/git-push-out-of-memory-malloc-failed
首先进入该项目的本地git目录,然后执行git config --global pack.XXX = X
My advice is to try several git parameters related with pack:
What it got better results for me was setting
Still, my host didn't have enough RAM memory (2GB) and kept failing. I hard copied the repo and moved it to another machine with more RAM (8GB). It got better but still failed.
执行完上面的步骤之后,执行git repack重新打包
Finally, I downloaded the latest version of git (https://github.com/git/git),
compile it and install it. That fixed the problem just by running
Once I got the repo fixed in my local machine I pushed it to master, overwriting the remote repo,
To prevent similar errors in the future try not to add unnecessary large files to the repo (in my case I got a SQL dump of 3.5GB :)) and disable delta compression for large files (such as images, PDFs, videos). Add the following lines to
fatal: index-pack failed
主要是由于32位和64位机的不同导致的,用下面的方法可以解决
参考地址:http://stackoverflow.com/questions/8855317/git-push-out-of-memory-malloc-failed
首先进入该项目的本地git目录,然后执行git config --global pack.XXX = X
如:git config --global pack.windowMemory 1024m
My advice is to try several git parameters related with pack:
[pack] threads = 1 deltaChaseSize = 128m windowMemory = 50m
What it got better results for me was setting
git config pack.threads 1and
git config pack.windowMemory 50m(default is 10m).
Still, my host didn't have enough RAM memory (2GB) and kept failing. I hard copied the repo and moved it to another machine with more RAM (8GB). It got better but still failed.
执行完上面的步骤之后,执行git repack重新打包
Finally, I downloaded the latest version of git (https://github.com/git/git),
compile it and install it. That fixed the problem just by running
git repack -adfwith the same parameters. After that I run
git gc --aggressive --prune=now
Once I got the repo fixed in my local machine I pushed it to master, overwriting the remote repo,
git push -f origin master.
To prevent similar errors in the future try not to add unnecessary large files to the repo (in my case I got a SQL dump of 3.5GB :)) and disable delta compression for large files (such as images, PDFs, videos). Add the following lines to
.gitattributes:
*.pdf -delta *.jpg -delta
http://kymcuc.blog.163.com/blog/static/201942114201322094421628/
相关文章推荐
- [leetcode 172] Factorial Trailing Zeroes
- MOSS程序中如何发Mail?
- 2015-11-3-Training(for 2014th)
- 如何使用sendEmail发送邮件
- LeetCode——Contains Duplicate III
- Android SDK安装更新:Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml
- 【leetcode】11. Container With Most Water
- leetcode-Contains Duplicate
- error C2556: “void main(void)”: 重载函数与“int main(void)”只是在返回类型上不同
- LINK : error LNK2001: 无法解析的外部符号 _mainCRTStartup
- Repair the Wall
- http://blog.csdn.net/chenli522/article/details/17001823
- Daily Scrum (2015/11/2)
- Hdu 2476 String painter (区间DP)
- 创建新项目paimai的一些记录
- 解决gitosis.init.InsecureSSHKeyUsername: Username contains not allowed characters问题
- 【UKIEPC2015 J】【趣味迷宫搜索】Jelly Raid 来回巡逻 不被发觉 循环节预处理
- No source available for "0x0" 出现这种问题的处理方法
- Rails
- opensource codes configure and compile with toolchain