Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git push fatal: unable to create thread: Resource temporarily unavailable

Tags:

git

git-push

I'm new to git. I'm want to push a large commit to a remote server but the problem is when I use

git push origin master 

it return the error

Counting objects: 5009, done. Delta compression using up to 16 threads. fatal: unable to create thread: Resource temporarily unavailable error: pack-objects died with strange error 

So is there anyway I can set the max thread use for Delta Compression.

Thanks for help,

Yuan Chen

like image 496
Yuan Chen Avatar asked Mar 28 '12 10:03

Yuan Chen


People also ask

Can t create thread Resource temporarily unavailable?

This error "fatal: unable to create thread: Resource temporarily unavailable" is comes when you do any git related operation like git pull or git push. This error comes because of the memory. when you run out of memory, this error will come.

What does Resource temporarily unavailable mean?

"Resource temporarily unavailable" is the error message corresponding to EAGAIN , which means that the operation would have blocked but nonblocking operation was requested.


1 Answers

The error: "fatal: unable to create thread: Resource temporarily unavailable" strongly suggests you've run out of memory on the server, which can happen if you have a repository with lots of large files, which can cause re-packing to take a lot of memory, or limited virtual memory - either in general, or just for that account due to the ulimit setting.

Anyways, here's the commands you can run to limit the amount of memory that packing may take by logging into the remote system (as the user that git runs as) and typing these commands:

git config --global pack.windowMemory "100m" git config --global pack.packSizeLimit "100m" git config --global pack.threads "1" 

Hope this works.

like image 105
Waqar Avatar answered Oct 04 '22 13:10

Waqar