3

I'm trying to move my repository from one remote server to another one with saving all history.

At first I pulled all changes from remote server to my local repository. Then I created new bare repository on destination server.
After that I tried to pull all branches from my local repository to remote one and I got following error:

Counting objects: 3758, done.
Compressing objects: 100% (2457/2457)
Writing objects: 100% (3758/3758), 6.96 MiB | 45 KiB/s
Writing objects: 100% (3758/3758), 6.98 MiB | 46 KiB/s, done.
Total 3758 (delta 2334), reused 2342 (delta 1282)
**remote: fatal: Out of memory, malloc failed (tried to allocate 56 bytes)**
error: unpack failed: index-pack abnormal exit
To XXX.XXX.XXX.XXX:test.git
! [remote rejected] dev -> dev (unpacker error)
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'XXX.XXX.XXX.XXX:test.git'

But at the same time I can clone this bare repository, add files to it and push to remote server. What can cause out of memory error?

Andrei Nestser
  • 364
  • 2
  • 9
  • http://stackoverflow.com/questions/3095737/is-there-a-way-to-limit-the-amount-of-memory-that-git-gc-uses – Gung Foo Sep 17 '13 at 11:29
  • I've been already playing with config file and set pack.windowMemory, pack.SizeLimit to 100m both same as to 1m both – Andrei Nestser Sep 17 '13 at 11:33
  • The < 4000 objects < 7 MB we can see from the screen shot should not be a problem. Does the repo contain huge files or anything "unusual" that could give a hint? How much free momory do your machines have? Have you followed memory consumption during you try the command? Is it likely that memory is really exhausted or is it just a misleading message? – Uwe Geuder Sep 17 '13 at 12:12
  • 1) destination repo is bare and doesn't contain anything; source one(from which I tried to copy repository) doesn't contain big files because full repo is 6,96 mb 2)I have 8 GB RAM and I don't think that git needs so much memory I have WHM installed on my destination server and I think that it could be any process killer is working and kill git process when it try to allocate memory but I cannot find some info about it – Andrei Nestser Sep 17 '13 at 17:44
  • 8 GB is much much more than git would ever require. I think I have used git on virtual machines with 384 kB and probably bigger repos than yours without any fatal errors. What version of git are you using? Built by yourself or from some distro? – Uwe Geuder Sep 18 '13 at 12:51
  • I'm using 1.7.1 version installed on CentOS 6.4 via 'yum install' command – Andrei Nestser Sep 19 '13 at 11:12

0 Answers0