Thursday, July 10, 2014

[Solved] Scm-Manager high cpu load

We use git. Our repo size is 2 GB with 60 K files and 14 K commits.

Suddenly, scm-manager (1.38) was using all the CPU.

And we had strange failures in TeamCity checkouts like :
remote: internal server error
fatal: protocol error: bad pack header
The problem was that our central bare repository had never been garbage collected (with git gc). Even running git gc was failing with the error
warning: packfile ... cannot be accessed
fatal: failed to read object ...: Too many open files
error: failed to run repack
Here is what I did :
  • bare clone the repo on another machine
  • run git gc
  • bare clone the previous repo to the original machine
  • run git gc
  • switch last repo with the broken one (et voilĂ )
HTH

Ref : https://groups.google.com/forum/#!topic/git-users/6XChKIqdG_U

No comments: