3

I'm having this problem while trying to push my repo to bitbucket for the first time:

[~/public_html]# git push -u origin --all
Counting objects: 2170, done.
Delta compression using up to 12 threads.
fatal: Out of memory, calloc failed  
error: pack-objects died with strange error

I've found similar propblems on StackOverflow that suggest using repack with --window-memory and --max-pack-size, but I get pretty much the same error:

[~/public_html]# git repack -a -d --window-memory 10m --max-pack-size 10m
Counting objects: 2170, done.
Delta compression using up to 12 threads.
fatal: Out of memory, calloc failed

My server has 4 GB of memory, so I can't see how it's run out. I don't have any particulary large files and my entire repo is only 12 MB

I have already done some searching, but I can't find anything particular to my case.

What could be happening here?

1 Answer 1

4

It looks like your web host is not allowing certain memory allocation instructions to execute. You might want to try compiling your own version of git with mmap turned off.

For reference: http://wiki.dreamhost.com/Git#Setup_Two:_More_Thoughtful

3
  • Thank you. I have contacted my webhost to see if memory is being restricted. I can't compile my own version as I don't have sudo access. I'll have to see what my host says.
    – MacroMan
    Feb 13, 2013 at 13:01
  • You don't need sudo access. You could just compile a version in your home directory, assuming all the relevant packages are available to you. Else, you would have to do something like the ideas here - superuser.com/questions/450726/…
    – Saurabh G
    Feb 13, 2013 at 13:08
  • My host made some config changes (they wouldn't say what changes) and it has fixed the problem, so most likely memory restriction. Thanks
    – MacroMan
    Feb 14, 2013 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.