PJoy
PJoy

Reputation: 75

git error : out of memory, malloc failed (tried to allocated X bytes)

I recently got the following error log when trying to clone a git repository :

remote: Counting objects: 4607, done.
error: git upload-pack: git-pack-objects died with error.B/s      
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: fatal: Out of memory, malloc failed (tried to allocate 119483755 bytes)
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

After investigating, it looks like the error is coming from the repo server. I connected via ssh and tried all the following (basically all solutions proposed by the first 2 pages of google results) :

I would appreciate some help, thanks.

Upvotes: 6

Views: 18073

Answers (1)

Umesh Patil
Umesh Patil

Reputation: 4978

This is same as GIT: fatal: Out of memory, malloc failed (tried to allocate 889192448 bytes).

Making below change in .gitconfig solved my problem

[http]
    postbuffer = 9999999999

This may work for you as well. Also check your .gitconfig file and which is being used. Also try to free up your RAM, it might also causing the issue.

Upvotes: 8

Related Questions