1

I am trying to push a repository from local to server and getting below error on linux:

$git push --all ; sync
Counting objects: 12, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.36 KiB | 1.36 MiB/s, done.
Total 12 (delta 10), reused 0 (delta 0)
error: cannot create thread: Nie można przydzielić pamięci
error: cannot create thread: Nie można przydzielić pamięci
fatal: bad object eb8cc7e1634b39049450d01cc38e95ddd33981bb
fatal: bad object eb8cc7e1634b39049450d01cc38e95ddd33981bb
error: pthread_join failed
To ssh://server/home/user/some.git
 ! [remote rejected] uff -> uff (missing necessary objects)
error: failed to push some refs to 'ssh://server/home/user/some.git'

comandline, system linux cli/server. I'm working on branch uff I can add modification but dont push to server.

$ git status
On branch uff
Your branch is ahead of 'origin/uff' by 3 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

What I must to do now? I found colision? This is possible?

Majo
  • 13
  • 4

1 Answers1

1

Could not allocate memory

According to Google translate

error: cannot create thread: Nie można przydzielić pamięci

means git error:

cannot create thread: Could not allocate memory

Howto fix memory issues in git

  • At first, check free -mh or top or htop. Your host has enough available RAM
  • Also, you can setup memory allocation for large git objects: git config --add core.bigFileThreshold 1m

bigFileThreshold option meaning

From documentation on git-config-core.bigFileThreshold:

Files larger than this size are stored deflated, without attempting delta compression. Storing large files without delta compression avoids excessive memory usage, at the slight expense of increased disk usage.

Default is 512 MiB on all platforms. This should be reasonable for most projects as source code and other text files can still be delta compressed, but larger binary media files won’t be.

Common unit suffixes of k, m, or g are supported.

Community
  • 1
  • 1
Yasen
  • 4,241
  • 1
  • 16
  • 25
  • I have a lot of memory (1.9G): $free -mh total used free shared buff/cache available Mem: 7,5G 576M 1,9G 72M 5,0G 6,6G Swap: 0B 0B 0B (i'm trying git config --add core.bigFileThreshold 1m) noting hapened, still this same error. I remove data from server and create again git --bare init and still this same. This repo working from months and all working ok – Majo Aug 07 '19 at 19:51
  • Hi @Majo, welcome to the club ) Have you tried `git config --add core.bigFileThreshold 1m` ? – Yasen Aug 08 '19 at 04:54
  • Yes, and this not helped. I create new catalog. push my data and reseting my computer (meybe lack of memory some program? I dont know) and... all working ;) Many, Many thanks. – Majo Aug 09 '19 at 18:00