2012-03-28 3 views
24

전 자식에게 익숙합니다. 난 큰 원격 서버에 커밋 밀어 싶지만 어쨌든 내가 최대 스레드를 설정할 수 있습니다git push fatal : 스레드를 만들 수 없음 : 리소스를 일시적으로 사용할 수 없습니다.

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 

그래서이 오류를 반환

git push origin master 

를 사용할 때 문제가 입니다 델타 압축에 사용합니다. 도움을

감사합니다,

위안 첸

+0

명령 당신은 포장이 원격 시스템 '자식 설정 --global pack.windowMemory "100m"' '자식 설정 --global pack.packSizeLimit "에 로그인하여 걸릴 수있는 메모리의 양을 제한하기 위해 실행할 수 100m "' 'git config --global pack.threads"1 "' – Adnan

답변

2

는 "unable to create thread: Resource temporarily unavailable는"(사용 가능한 더 이상 메모리 등) 원격 서버에 문제를 의미한다. 델타에 관한

, 당신은 조정할 config을 다음 있습니다 :

pack.deltaCacheSize 

The maximum memory in bytes used for caching deltas in git-pack-objects(1) before writing them out to a pack.
This cache is used to speed up the writing object phase by not having to recompute the final delta result once the best match for all objects is found.
Repacking large repositories on machines which are tight with memory might be badly impacted by this though, especially if this cache pushes the system into swapping.
A value of 0 means no limit.
The smallest size of 1 byte may be used to virtually disable this cache. Defaults to 256 MiB.

pack.deltaCacheLimit 

The maximum size of a delta, that is cached in git-pack-objects(1).
This cache is used to speed up the writing object phase by not having to recompute the final delta result once the best match for all objects is found. Defaults to 1000.

그렇게 질문 "Git pull fails with bad pack header error"참조 다른 pack - 관련 CONFIGS합니다.

2

나는 또한이 오류를 발견했습니다. 더 간단하게하기 위해이 오류는 100MB 파일을 50MB 이하의 여유 공간이있는 하드 디스크에 복사하려고하기 때문에 발생합니다. 서버에이, SSH를 수정하고 다음 명령을 실행하십시오

git config --global pack.windowMemory "100m" 
git config --global pack.packSizeLimit "100m" 
+2

'pack.packSizeLimit'은'pack.SizeLimit'이 아니어야합니다. – yig

75

오류 : "치명적인 : 스레드를 만들 수 없습니다 : 일시적으로 사용할 수 없습니다 자원을"강력 서버에 메모리가 부족했습니다 제안하는 큰 파일이 많은 저장소가있는 경우 일반적으로 또는 ulimit 설정으로 인해 해당 계정에 대해 많은 양의 메모리 또는 제한된 가상 메모리를 다시 채울 수 있습니다.

어쨌든

, 여기에 명령을 사용하면 패킹 (자식이 아니라 실행하는 사용자로) 원격 시스템에 로그인하여 걸릴 수있는 메모리의 양을 제한하기 위해 실행할 수있는 그리고 입력이 명령 :

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

희망 이 작품.

+15

많은 공유 호스팅 솔루션이 스레드를 특별히 제한합니다. 보통이 대답을 마지막 명령과 함께 <10으로 낮추면 문제가 해결됩니다. – Qix

+1

내 공유 호스트에서 원격으로 'git push'하려고 할 때이 문제가 발생했습니다. 'pack.threads "설정 10"'나를 위해 그것을 고정. 재 포장 단계에있을 때'git gc '를 실행하려고 할 때 비슷한 문제가 발생했습니다. 똑같은 수정. 건배. –

+1

서버가 스마트 HTTP 프로토콜을 사용하는 경우 프로세스의 글로벌 구성을 설정하지 못할 수도 있습니다. 대신에'cd'를 git 저장소의 디렉토리에 넣고'--global'없이 같은 명령을 실행하십시오. – yig