6

I already tried to research via google and in other posts but couldn't find a solution that works for me. I'm connected to a server via SSH and try to clone an existing git repo via git clone https://github.com/myrepo to this server. Unfortunately this ends in

error: index-pack died of signal 9 fatal: index-pack failed

The whole message is:

remote: Enumerating objects: 20132, done.
remote: Counting objects: 100% (20132/20132), done.
remote: Compressing objects: 100% (18700/18700), done.
remote: Total 20132 (delta 1176), reused 20129 (delta 1174), pack-reused 0
Receiving objects: 100% (20132/20132), 826.83 MiB | 18.76 MiB/s, done.
error: index-pack died of signal 9
fatal: index-pack failed

I read it might be a storage issue but couldnt come up with any working solution. Even adjusting the memory size didn't work. I used these commands

git config pack.windowMemory 10m
git config pack.packSizeLimit 20m

But still get the same error. I also tried a shallow clone with git clone --depth 1 https://github.com/myrepo. It results in the same error. My repo is stored on github. Pulling and Pushing localy works without any issues (I have another copy of it on my local system in xampp). I also tried to clone it on my local machine - this works without any issue. Just as soon as I'm connected to the server via ssh it doesn't work. The git version on the server is 2.17.1

Any suggestions where the problem is? I tried to trace the error with GIT_TRACE=1 but couldn't get any more information

Bine
  • 394
  • 4
  • 12
  • 1
    Try these settings: https://stackoverflow.com/a/6066772/7976758 – phd Jul 05 '19 at 11:51
  • I tried it now, unfortunately, it results still in the same error – Bine Jul 05 '19 at 11:55
  • Create a new repo at the server and push from your local clone. Or `rsync` your local clone to the server. – phd Jul 05 '19 at 11:58
  • 3
    Signal number 9 is SIGKILL. If Git is getting random SIGKILLs from the system, this is likely due to the ["OOM killer"](https://unix.stackexchange.com/questions/153585/how-does-the-oom-killer-decide-which-process-to-kill-first). The best cure is to obtain more memory. The second-best is to reduce the load on your system. – torek Jul 05 '19 at 18:11
  • 4
    Thanks, guys. I reduced now the size of the repo by excluding media files. It was really a memory issue. Now it works perfectly with a smaller repo. – Bine Jul 08 '19 at 06:29
  • 2
    I had the same issue on VPS with 512MB RAM. I added swapfile and the problem was solved. Thanks to everyone here! – Tsar Ioann Nov 07 '20 at 14:09
  • OP should write a self answer if no one else will about increasing memory size...was the same for me too! – Hansang Nov 18 '20 at 10:02

1 Answers1

7

I solved it by adding more memory to my virtual machine (from 1 GB to 2 GB)

Mig27
  • 71
  • 1
  • 2