本文介绍了git push致命:无法创建线程:资源暂时不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我是git的新手。
我想推送一个大的提交到远程服务器,但问题是
当我使用

  git push origin master 

它返回错误

 计数对象:5009,完成。 
增量压缩使用多达16个线程。
致命:无法创建线程:资源暂时不可用
错误:包对象死于奇怪的错误

因此,无论如何,我可以设置Delta Compression的最大线程用量。



感谢您的帮助,

Yuan Chen 解决方案

错误:致命:无法创建线程:资源暂时不可用强烈建议您在服务器上运行内存不足,如果您的存储库中有大量大文件,可能会导致重新打包需要大量内存或有限的虚拟内存(无论是通常还是仅限于此)由于ulimit的设置,这个账户是不可能的。



无论如何,这里是您可以运行的命令,通过登录到远程系统来限制打包的内存量(作为用户那git运行)和输入这些命令:

  git config --global pack.windowMemory100m
git config --global pa ck.packSizeLimit100m
git config --global pack.threads1

希望这有效。


I'm new to git.I'm want to push a large commit to a remote server but the problem iswhen 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

解决方案

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.

这篇关于git push致命:无法创建线程:资源暂时不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 10:44